Previous 15994 Revisions Next

r7812 Thursday 15th April, 2010 at 13:21:11 UTC by Miodrag Milanović
[MESSUI] Fix for corrupted RAM options.
[src/mess]infomess.c
[src/mess/devices]messram.c
[src/mess/osd/winui]propertiesms.c

src/mess/devices/messram.c
r7811r7812
189189            /* verify extra ram options */
190190            if (config->extra_options != NULL)
191191            {
192               const char *s;
193
194               astring buffer;
195               astring_cpyc(&buffer, config->extra_options);
196               astring_replacechr(&buffer, ',', 0);
197
198               s = astring_c(&buffer);
199
192               int j;
193               int size = strlen(config->extra_options);
194               char *s = mame_strdup(config->extra_options);
195               for (j=0;j<size;j++) {
196                  if (s[j]==',') s[j]=0;
197               }
198               
200199               /* try to parse each option */
201200               while(*s != '\0')
202201               {
src/mess/infomess.c
r7811r7812
101101      fprintf(out, "\t\t<ramoption default=\"1\">%u</ramoption>\n",  messram_parse_string(ram->default_size));
102102      if (ram->extra_options != NULL)
103103      {
104         const char *s;
105
106         astring buffer;
107         astring_cpyc(&buffer, ram->extra_options);
108         astring_replacechr(&buffer, ',', 0);
109
110         s = astring_c(&buffer);
111
104         int j;
105         int size = strlen(ram->extra_options);
106         char *s = mame_strdup(ram->extra_options);
107         for (j=0;j<size;j++) {
108            if (s[j]==',') s[j]=0;
109         }
112110         /* try to parse each option */
113111         while(*s != '\0')
114112         {
src/mess/osd/winui/propertiesms.c
r7811r7812
439439      }
440440      if (config->extra_options != NULL)
441441      {
442         const char *s;
443
444         astring buffer;
445         astring_cpyc(&buffer, config->extra_options);
446         astring_replacechr(&buffer, ',', 0);
447
448         s = astring_c(&buffer);
449
442         int j;
443         int size = strlen(config->extra_options);
444         char *s = mame_strdup(config->extra_options);
445         for (j=0;j<size;j++) {
446            if (s[j]==',') s[j]=0;
447         }
448         
450449         /* try to parse each option */
451450         while(*s != '\0')
452451         {
453452            i++;
454453            // identify this option
455454            ram = messram_parse_string(s);
456           
457            if (ram==0) break;
458           
455
459456            this_ram_string = s;
460457
461458            t_ramstring = tstring_from_utf8(this_ram_string);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team