src/SDL_error.c
changeset 1612 97d0966f4bf7
parent 1402 d910939febfa
child 1659 14717b52abc0
child 1818 7995cc87b777
     1.1 --- a/src/SDL_error.c	Fri Mar 24 05:11:51 2006 +0000
     1.2 +++ b/src/SDL_error.c	Fri Mar 24 06:10:24 2006 +0000
     1.3 @@ -90,11 +90,11 @@
     1.4  				break;
     1.5  			    case 's':
     1.6  				{
     1.7 -				  int index = error->argc;
     1.8 -				  char *str = va_arg(ap, char *);
     1.9 +				  int i = error->argc;
    1.10 +				  const char *str = va_arg(ap, const char *);
    1.11  				  if (str == NULL)
    1.12  				      str = "(null)";
    1.13 -				  SDL_strlcpy((char *)error->args[index].buf, str, ERR_MAX_STRLEN);
    1.14 +				  SDL_strlcpy((char *)error->args[i].buf, str, ERR_MAX_STRLEN);
    1.15  				  error->argc++;
    1.16  				}
    1.17  				break;