Avoid Atoi to avoid int convertion
This commit is contained in:
parent
8702db568c
commit
0f48b27a04
11 changed files with 32 additions and 39 deletions
|
@ -20,7 +20,7 @@ func SubmissionHandler(w http.ResponseWriter, r *http.Request, team string, sURL
|
|||
}
|
||||
|
||||
// Check exercice validity then save the submission
|
||||
if pex, err := strconv.Atoi(sURL[0]); err != nil {
|
||||
if pex, err := strconv.ParseInt(sURL[0], 10, 64); err != nil {
|
||||
http.Error(w, "{\"errmsg\":\"Requête invalide.\"}", http.StatusBadRequest)
|
||||
return
|
||||
} else if exercice := fmt.Sprintf("%d", pex); len(exercice) < 1 {
|
||||
|
|
Reference in a new issue