break;
case GD_TYPE_PROBABILITY:
- res = g_ascii_strtod(params[paramindex], NULL);
+ errno = 0; /* must be reset before calling strtod() to detect overflow/underflow */
+ res = strtod(params[paramindex], NULL);
if (errno == 0 && res >= 0 && res <= 1)
{
/* fill all remaining items in array - may be only one */
break;
case GD_TYPE_RATIO:
- res = g_ascii_strtod (params[paramindex], NULL);
+ errno = 0; /* must be reset before calling strtod() to detect overflow/underflow */
+ res = strtod (params[paramindex], NULL);
if (errno == 0 && res >= 0 && res <= 1)
{
for (k = j; k < prop_desc[i].count; k++)
/* strip leading and trailing spaces AFTER checking if we are reading a map.
map lines might begin or end with spaces */
- g_strstrip(line);
+ stripString(line);
if (reading_highscore)
{
object.element = cave->initial_border;
object.fill_element = cave->initial_border;
- cave->objects = list_prepend(cave->objects, getMemCopy(&object, sizeof(object)));
+ cave->objects = list_prepend(cave->objects, get_memcpy(&object, sizeof(object)));
object.x1 = 19;
object.y1 = 0; /* 19, as it is also the border */
- cave->objects = list_prepend(cave->objects, getMemCopy(&object, sizeof(object))); /* another */
+ cave->objects = list_prepend(cave->objects, get_memcpy(&object, sizeof(object))); /* another */
}
}
}