hw-00: Fix bad pointer comparison
This commit is contained in:
parent
53cb367145
commit
5d86ef63b2
@ -38,7 +38,7 @@ int main() {
|
||||
// Check whether a range error occured or
|
||||
// No characters were read by getline
|
||||
// or check that strtol didnt move a single char
|
||||
if(errno == ERANGE || chars_read == -1 || end == &buf[0]) {
|
||||
if(errno == ERANGE || chars_read == -1 || end == buf) {
|
||||
printf("%s\n", NOT_A_NUMBER);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user