Skip to content

Commit

Permalink
Fix cosmetic issue with downcasting int to char.
Browse files Browse the repository at this point in the history
Note that d can be set to EOF (normally represented by int(-1)),
so a cast to char _should_ not cause issues as char(255) is
not a space character.
  • Loading branch information
eldering committed Feb 26, 2015
1 parent 6a993f4 commit fa57890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion default_validator/default_validator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ int main(int argc, char **argv) {
while (isspace(judgeans.peek())) {
char c = (char)judgeans.get();
if (space_change_sensitive) {
char d = std::cin.get();
int d = std::cin.get();
if (c != d) {
wrong_answer("Space change error: got %d expected %d", d, c);
}
Expand Down

0 comments on commit fa57890

Please sign in to comment.