ref: 940e775979c51e7f7deba1eeed31643ec6755c2b
parent: e310c02c6fbd3b6dfe2a3bfc66ebdebd0186bf42
author: zamfofex <zamfofex@twdb.moe>
date: Wed Feb 7 15:42:36 EST 2024
fix UCI parsing
--- a/main.c
+++ b/main.c
@@ -81,7 +81,7 @@
perror(argv[0]);
return 1;
}
- if (*end == 0 || *xtime < 0)
+ if (*end != 0 || *xtime < 0)
{fprintf(stderr, "%s: malformed time in 'go' command\n", argv[0]);
return 1;
@@ -105,9 +105,9 @@
perror(argv[0]);
return 1;
}
- if (*end == 0 || long_depth < 0 || long_depth > 100)
+ if (*end != 0 || long_depth < 0 || long_depth > 100)
{- fprintf(stderr, "%s: malformed time in 'go' command\n", argv[0]);
+ fprintf(stderr, "%s: malformed depth in 'go' command\n", argv[0]);
return 1;
}
--
⑨