Skip to content

Commit 52201ba

Browse files
committed
Fix problem "0" bug
Problem "0" is interpreted as problem "A" during a contest. Fixed minimum go version.
1 parent 09ed316 commit 52201ba

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[![Github release](https://img.shields.io/github/release/aqua4/cf-tool-cpe.svg)](https://github.com/aqua4/cf-tool-cpe/releases)
55
[![Go Report Card](https://goreportcard.com/badge/github.com/aqua4/cf-tool-cpe)](https://goreportcard.com/report/github.com/aqua4/cf-tool-cpe)
6-
[![Go Version](https://img.shields.io/badge/go-%3E%3D1.18-green.svg)](https://github.com/golang)
6+
[![Go Version](https://img.shields.io/badge/go-%3E%3D1.17-green.svg)](https://github.com/golang)
77
[![license](https://img.shields.io/badge/license-MIT-%23373737.svg)](https://raw.githubusercontent.com/aqua4/cf-tool-cpe/main/LICENSE)
88

99
Codeforces Tool CP Editor edition is a command-line interface tool for [Codeforces](https://codeforces.com) and [CP Editor](https://github.com/cpeditor/cpeditor/).
@@ -66,6 +66,7 @@ File:
6666
* Removed most of the CLI commands which are not used by CP editor.
6767
* Removed all programming languages support.
6868
* Added C++20 support.
69+
* Problem "0" is interpreted as problem "A" during a contest.
6970

7071
## FAQ
7172

cmd/args.go

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func parseArgs(opts docopt.Opts) error {
4444
if info.ProblemID != "" && info.ProblemID != value {
4545
return fmt.Errorf("Problem ID conflicts: %v %v", info.ProblemID, value)
4646
}
47+
if value == "0" {
48+
value = "A"
49+
}
4750
info.ProblemID = value
4851
}
4952
if info.ProblemType == "" || info.ProblemType == "contest" {

0 commit comments

Comments
 (0)