mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 19:50:45 +00:00
This seems like a good idea...
git-svn-id: https://svn.eduke32.com/eduke32@386 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c8abb8384d
commit
7dcd346352
1 changed files with 8 additions and 2 deletions
|
@ -2379,6 +2379,8 @@ char parsecommand(void)
|
||||||
|
|
||||||
if (music_fn[k][i] == NULL)
|
if (music_fn[k][i] == NULL)
|
||||||
music_fn[k][i] = Bcalloc(Bstrlen(tempbuf)+1,sizeof(char));
|
music_fn[k][i] = Bcalloc(Bstrlen(tempbuf)+1,sizeof(char));
|
||||||
|
else if ((Bstrlen(tempbuf)+1) > sizeof(music_fn[k][i]))
|
||||||
|
music_fn[k][i] = Brealloc(music_fn[k][i],(Bstrlen(tempbuf)+1));
|
||||||
|
|
||||||
Bstrcpy(music_fn[k][i],tempbuf);
|
Bstrcpy(music_fn[k][i],tempbuf);
|
||||||
|
|
||||||
|
@ -4539,8 +4541,10 @@ repeatcase:
|
||||||
|
|
||||||
if (level_file_names[j*MAXLEVELS+k] == NULL)
|
if (level_file_names[j*MAXLEVELS+k] == NULL)
|
||||||
level_file_names[j*MAXLEVELS+k] = Bcalloc(Bstrlen(tempbuf)+1,sizeof(char));
|
level_file_names[j*MAXLEVELS+k] = Bcalloc(Bstrlen(tempbuf)+1,sizeof(char));
|
||||||
|
else if ((Bstrlen(tempbuf)+1) > sizeof(level_file_names[j*MAXLEVELS+k]))
|
||||||
|
level_file_names[j*MAXLEVELS+k] = Brealloc(level_file_names[j*MAXLEVELS+k],(Bstrlen(tempbuf)+1));
|
||||||
|
|
||||||
/* initprintf("level file name string len: %ld\n",Bstrlen(tempbuf)); */
|
/* initprintf("level file name string len: %ld\n",Bstrlen(tempbuf)); */
|
||||||
|
|
||||||
Bstrcpy(level_file_names[j*MAXLEVELS+k],tempbuf);
|
Bstrcpy(level_file_names[j*MAXLEVELS+k],tempbuf);
|
||||||
|
|
||||||
|
@ -4579,8 +4583,10 @@ repeatcase:
|
||||||
|
|
||||||
if (level_names[j*MAXLEVELS+k] == NULL)
|
if (level_names[j*MAXLEVELS+k] == NULL)
|
||||||
level_names[j*MAXLEVELS+k] = Bcalloc(Bstrlen(tempbuf)+1,sizeof(char));
|
level_names[j*MAXLEVELS+k] = Bcalloc(Bstrlen(tempbuf)+1,sizeof(char));
|
||||||
|
else if ((Bstrlen(tempbuf)+1) > sizeof(level_names[j*MAXLEVELS+k]))
|
||||||
|
level_names[j*MAXLEVELS+k] = Brealloc(level_names[j*MAXLEVELS+k],(Bstrlen(tempbuf)+1));
|
||||||
|
|
||||||
/* initprintf("level name string len: %ld\n",Bstrlen(tempbuf)); */
|
/* initprintf("level name string len: %ld\n",Bstrlen(tempbuf)); */
|
||||||
|
|
||||||
Bstrcpy(level_names[j*MAXLEVELS+k],tempbuf);
|
Bstrcpy(level_names[j*MAXLEVELS+k],tempbuf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue