Fix time overflow bug
[capablanca.git] / lasker-2.2.3 / src / utils.c
index d6245ca..9b3ee5c 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 
-static int safestring(char *str);
+int safestring(char *str);
 
 char *eatword(char *str)
 {
@@ -362,7 +362,7 @@ static int safechar(int c)
        return (isprint(c) && !strchr(">!&*?/<|`$;", c));
 }
 
-static int safestring(char *str)
+int safestring(char *str)
 {
        int i;
 
@@ -485,7 +485,7 @@ unsigned tenth_secs(void)
 */
 int untenths(unsigned tenths)
 {
-  return (tenths / 10 + 331939277 + 0xffffffff / 10 + 1);
+  return (tenths / 10 + 331939277 + 4*((1<<30) / 5) + 1);
 }
 
 char *tenth_str(unsigned t, int spaces)