hw-00: Fix bad pointer comparison

This commit is contained in:
Tomáš Kléger committed 2025-10-07 14:03:24 +02:00
1 parent 53cb367145
commit 5d86ef63b2
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}