mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
Fix a sizeof braino.
Somebody (probably me) got a little over-happy with sizeof.
This commit is contained in:
parent
f63e505c92
commit
824e33c82b
1 changed files with 3 additions and 2 deletions
|
@ -216,12 +216,13 @@ Qdopen (int fd, const char *mode)
|
|||
QFile *file;
|
||||
char *m, *p;
|
||||
int zip = 0;
|
||||
int len = strlen (mode);
|
||||
|
||||
m = alloca (strlen (mode) + 1);
|
||||
m = alloca (len + 1);
|
||||
#ifdef _WIN32
|
||||
setmode (fd, O_BINARY);
|
||||
#endif
|
||||
for (p = m; *mode && p - m < ((int) sizeof (m) - 1); mode++) {
|
||||
for (p = m; *mode && p - m < len; mode++) {
|
||||
if (*mode == 'z') {
|
||||
zip = 1;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue