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:
terminx 2006-12-05 21:51:24 +00:00
parent c8abb8384d
commit 7dcd346352

View file

@ -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);