mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
Yet more char index issues :P
This commit is contained in:
parent
ee27c49e70
commit
cc35209f86
2 changed files with 5 additions and 5 deletions
|
@ -162,7 +162,7 @@ parse_expression (progs_t *pr, const char *expr, int conditional)
|
|||
d = *field;
|
||||
expr_ptr = &ent->v[field->ofs];
|
||||
d.ofs = PR_SetPointer (pr, expr_ptr);
|
||||
} else if (isdigit (es->token->str[0])) {
|
||||
} else if (isdigit ((byte) es->token->str[0])) {
|
||||
expr_ptr = PR_GetPointer (pr, strtol (es->token->str, 0, 0));
|
||||
d.type = ev_void;
|
||||
d.ofs = PR_SetPointer (pr, expr_ptr);
|
||||
|
@ -252,8 +252,8 @@ PR_Load_Source_File (progs_t *pr, const char *fname)
|
|||
f->lines[0].text = f->text;
|
||||
for (f->num_lines = 0, l = f->text; *l; l++) {
|
||||
if (*l == '\n') {
|
||||
for (p = l; p > f->lines[f->num_lines].text && isspace(p[-1]);
|
||||
p--)
|
||||
for (p = l; p > f->lines[f->num_lines].text
|
||||
&& isspace((byte) p[-1]); p--)
|
||||
;
|
||||
f->lines[f->num_lines].len = p - f->lines[f->num_lines].text;
|
||||
f->lines[++f->num_lines].text = l + 1;
|
||||
|
|
|
@ -701,14 +701,14 @@ PR_Sprintf (progs_t *pr, dstring_t *result, const char *name,
|
|||
case '.':
|
||||
(*fi)->precision = 0;
|
||||
c++;
|
||||
while (isdigit (*c)) {
|
||||
while (isdigit ((byte )*c)) {
|
||||
(*fi)->precision *= 10;
|
||||
(*fi)->precision += *c++ - '0';
|
||||
}
|
||||
continue;
|
||||
case '1': case '2': case '3': case '4': case '5':
|
||||
case '6': case '7': case '8': case '9':
|
||||
while (isdigit (*c)) {
|
||||
while (isdigit ((byte )*c)) {
|
||||
(*fi)->minFieldWidth *= 10;
|
||||
(*fi)->minFieldWidth += *c++ - '0';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue