mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 16:51:08 +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;
|
d = *field;
|
||||||
expr_ptr = &ent->v[field->ofs];
|
expr_ptr = &ent->v[field->ofs];
|
||||||
d.ofs = PR_SetPointer (pr, expr_ptr);
|
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));
|
expr_ptr = PR_GetPointer (pr, strtol (es->token->str, 0, 0));
|
||||||
d.type = ev_void;
|
d.type = ev_void;
|
||||||
d.ofs = PR_SetPointer (pr, expr_ptr);
|
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;
|
f->lines[0].text = f->text;
|
||||||
for (f->num_lines = 0, l = f->text; *l; l++) {
|
for (f->num_lines = 0, l = f->text; *l; l++) {
|
||||||
if (*l == '\n') {
|
if (*l == '\n') {
|
||||||
for (p = l; p > f->lines[f->num_lines].text && isspace(p[-1]);
|
for (p = l; p > f->lines[f->num_lines].text
|
||||||
p--)
|
&& isspace((byte) p[-1]); p--)
|
||||||
;
|
;
|
||||||
f->lines[f->num_lines].len = p - f->lines[f->num_lines].text;
|
f->lines[f->num_lines].len = p - f->lines[f->num_lines].text;
|
||||||
f->lines[++f->num_lines].text = l + 1;
|
f->lines[++f->num_lines].text = l + 1;
|
||||||
|
|
|
@ -701,14 +701,14 @@ PR_Sprintf (progs_t *pr, dstring_t *result, const char *name,
|
||||||
case '.':
|
case '.':
|
||||||
(*fi)->precision = 0;
|
(*fi)->precision = 0;
|
||||||
c++;
|
c++;
|
||||||
while (isdigit (*c)) {
|
while (isdigit ((byte )*c)) {
|
||||||
(*fi)->precision *= 10;
|
(*fi)->precision *= 10;
|
||||||
(*fi)->precision += *c++ - '0';
|
(*fi)->precision += *c++ - '0';
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
case '1': case '2': case '3': case '4': case '5':
|
case '1': case '2': case '3': case '4': case '5':
|
||||||
case '6': case '7': case '8': case '9':
|
case '6': case '7': case '8': case '9':
|
||||||
while (isdigit (*c)) {
|
while (isdigit ((byte )*c)) {
|
||||||
(*fi)->minFieldWidth *= 10;
|
(*fi)->minFieldWidth *= 10;
|
||||||
(*fi)->minFieldWidth += *c++ - '0';
|
(*fi)->minFieldWidth += *c++ - '0';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue