X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=steam.h;h=2c8bd2d5ca886c347becf3c8ab2724d6fc0d0673;hb=137d40d96fe923600d8378b8e138e3c276f27ff4;hp=730784ea1cef0feed774b05d39c054c22df116b6;hpb=22f62f001f21d1b91fefd9fc495c122d9ddf205a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/steam.h b/steam.h index 730784e..2c8bd2d 100644 --- a/steam.h +++ b/steam.h @@ -171,13 +171,12 @@ static u32 utf8_byte0_byte_count( u8 char0 ) return 0; } -static void str_utf8_collapse( const char *str, char *buf, u32 length ) -{ +static u32 str_utf8_collapse( const char *str, char *buf, u32 length ){ u8 *ustr = (u8 *)str; u32 utf32_code = 0x00000000; u32 i=0, j=0, utf32_byte_ct=0; - for(;i < length-1;){ + for(;j < length-1;){ if( ustr[i] == 0x00 ) break; @@ -210,6 +209,7 @@ static void str_utf8_collapse( const char *str, char *buf, u32 length ) } buf[j] = 0x00; + return j; } static int steam_init(void){