diff --git a/Quake/common.c b/Quake/common.c index 14c78158..b1065a17 100644 --- a/Quake/common.c +++ b/Quake/common.c @@ -421,6 +421,9 @@ int Q_atoi (const char *str) int sign; int c; + while (q_isspace (*str)) + ++str; + if (*str == '-') { sign = -1; @@ -481,6 +484,9 @@ float Q_atof (const char *str) int c; int decimal, total; + while (q_isspace (*str)) + ++str; + if (*str == '-') { sign = -1;