]> granicus.if.org Git - nethack/commitdiff
Use our dupstr instead
authorPasi Kallinen <paxed@alt.org>
Fri, 30 Oct 2015 21:27:19 +0000 (23:27 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 30 Oct 2015 21:27:19 +0000 (23:27 +0200)
src/options.c

index 9e949de54b8aeea133b9befbcafe739aee48af88..07f124a56658d70f416c992fae70b7bd506b6a06 100644 (file)
@@ -4338,9 +4338,7 @@ boolean setinitial, setfromfile;
                         clear_symsetentry(which_set, TRUE);
 
                         /* transfer only the name of the symbol set */
-                        symset[which_set].name =
-                            (char *) alloc(strlen(sl->name) + 1);
-                        Strcpy(symset[which_set].name, sl->name);
+                        symset[which_set].name = dupstr(sl->name);
                         ready_to_switch = TRUE;
                         break;
                     }