src/stdlib/SDL_iconv.c
changeset 1513 13a3520a13f9
parent 1510 720f8bb49d7d
child 1519 c99e7a9c9bc9
     1.1 --- a/src/stdlib/SDL_iconv.c	Mon Mar 13 02:12:39 2006 +0000
     1.2 +++ b/src/stdlib/SDL_iconv.c	Mon Mar 13 02:26:47 2006 +0000
     1.3 @@ -383,8 +383,8 @@
     1.4  				if ( srclen < 2 ) {
     1.5  					return SDL_ICONV_EINVAL;
     1.6  				}
     1.7 -				W1 = ((Uint32)p[0] << 8) |
     1.8 -				      (Uint32)p[1];
     1.9 +				W1 = ((Uint16)p[0] << 8) |
    1.10 +				      (Uint16)p[1];
    1.11  				src += 2;
    1.12  				srclen -= 2;
    1.13  				if ( W1 < 0xD800 || W1 > 0xDFFF ) {
    1.14 @@ -402,8 +402,8 @@
    1.15  					return SDL_ICONV_EINVAL;
    1.16  				}
    1.17  				p = (Uint8 *)src;
    1.18 -				W2 = ((Uint32)p[0] << 8) |
    1.19 -				      (Uint32)p[1];
    1.20 +				W2 = ((Uint16)p[0] << 8) |
    1.21 +				      (Uint16)p[1];
    1.22  				src += 2;
    1.23  				srclen -= 2;
    1.24  				if ( W2 < 0xDC00 || W2 > 0xDFFF ) {
    1.25 @@ -424,8 +424,8 @@
    1.26  				if ( srclen < 2 ) {
    1.27  					return SDL_ICONV_EINVAL;
    1.28  				}
    1.29 -				W1 = ((Uint32)p[1] << 8) |
    1.30 -				      (Uint32)p[0];
    1.31 +				W1 = ((Uint16)p[1] << 8) |
    1.32 +				      (Uint16)p[0];
    1.33  				src += 2;
    1.34  				srclen -= 2;
    1.35  				if ( W1 < 0xD800 || W1 > 0xDFFF ) {
    1.36 @@ -443,8 +443,8 @@
    1.37  					return SDL_ICONV_EINVAL;
    1.38  				}
    1.39  				p = (Uint8 *)src;
    1.40 -				W2 = ((Uint32)p[1] << 8) |
    1.41 -				      (Uint32)p[0];
    1.42 +				W2 = ((Uint16)p[1] << 8) |
    1.43 +				      (Uint16)p[0];
    1.44  				src += 2;
    1.45  				srclen -= 2;
    1.46  				if ( W2 < 0xDC00 || W2 > 0xDFFF ) {