src/filegen.c: fix bug introduced in 0fdbc68915
This commit is contained in:
parent
1917ee48c1
commit
551a2b2a5b
1 changed files with 3 additions and 2 deletions
|
@ -696,11 +696,12 @@ static int _file_rename(char *filename, const void *buffer, const int buffer_siz
|
|||
*dst++ = '_';
|
||||
/*@
|
||||
@ loop invariant offset <= off <= buffer_size;
|
||||
@ loop invariant valid_read_string(src);
|
||||
@*/
|
||||
for(off=offset; off<buffer_size && *src!='\0'; off++)
|
||||
for(off=offset; off<buffer_size; off++)
|
||||
{
|
||||
const char c=((const char *)buffer)[off];
|
||||
if(c=='\0')
|
||||
break;
|
||||
switch(c)
|
||||
{
|
||||
case '/':
|
||||
|
|
Loading…
Reference in a new issue