small compression
[carveJwlIkooP6JGAAIwe30JlM.git] / steam.h
diff --git a/steam.h b/steam.h
index 730784ea1cef0feed774b05d39c054c22df116b6..2c8bd2d5ca886c347becf3c8ab2724d6fc0d0673 100644 (file)
--- 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){