mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-29 07:11:44 +00:00
Few LCC memory fixes.
This commit is contained in:
parent
7c2dd01873
commit
76ec9fb6bd
2 changed files with 4 additions and 2 deletions
|
@ -315,7 +315,7 @@ puttokens(Tokenrow *trp)
|
|||
if (wbp >= &wbuf[OBS]) {
|
||||
write(1, wbuf, OBS);
|
||||
if (wbp > &wbuf[OBS])
|
||||
memcpy(wbuf, wbuf+OBS, wbp - &wbuf[OBS]);
|
||||
memmove(wbuf, wbuf+OBS, wbp - &wbuf[OBS]);
|
||||
wbp -= OBS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ void UpdatePaths( const char *lccBinary )
|
|||
{
|
||||
char basepath[ 1024 ];
|
||||
char *p;
|
||||
size_t basepathsz = sizeof( basepath ) - 1;
|
||||
|
||||
strncpy( basepath, lccBinary, 1024 );
|
||||
strncpy( basepath, lccBinary, basepathsz );
|
||||
basepath[basepathsz] = 0;
|
||||
p = strrchr( basepath, PATH_SEP );
|
||||
|
||||
if( p )
|
||||
|
|
Loading…
Reference in a new issue