fix a buffer underflow
This commit is contained in:
parent
dd0332632e
commit
5fac3e6f3a
|
@ -573,7 +573,7 @@ separate_compile (void)
|
||||||
f = output_file->str + strlen (output_file->str);
|
f = output_file->str + strlen (output_file->str);
|
||||||
while (f >= output_file->str && *f != '.' && *f != '/')
|
while (f >= output_file->str && *f != '.' && *f != '/')
|
||||||
f--;
|
f--;
|
||||||
if (*f == '.') {
|
if (f >= output_file->str && *f == '.') {
|
||||||
output_file->size -= strlen (f);
|
output_file->size -= strlen (f);
|
||||||
dstring_appendstr (extension, f);
|
dstring_appendstr (extension, f);
|
||||||
*f = 0;
|
*f = 0;
|
||||||
|
|
Loading…
Reference in New Issue