diff options
author | Stuart Connolly <stuart02@gmail.com> | 2013-11-30 20:13:45 +0000 |
---|---|---|
committer | Stuart Connolly <stuart02@gmail.com> | 2013-11-30 20:13:45 +0000 |
commit | 19bde59d3eae295d907e41a4185cd487ae780123 (patch) | |
tree | a3d078388243ccb4b5885ad64313345b492079db /Frameworks | |
parent | daba58c692dea782b0fae8ffa73ed73cb173a4e4 (diff) | |
download | sequelpro-19bde59d3eae295d907e41a4185cd487ae780123.tar.gz sequelpro-19bde59d3eae295d907e41a4185cd487ae780123.tar.bz2 sequelpro-19bde59d3eae295d907e41a4185cd487ae780123.zip |
Fix warning.
Diffstat (limited to 'Frameworks')
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Data Conversion.m | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Data Conversion.m b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Data Conversion.m index 80b198d5..9b0f07d6 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Data Conversion.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Data Conversion.m @@ -219,10 +219,16 @@ static inline NSString * _bitStringWithBytes(const char *bytes, NSUInteger lengt // Generate a nul-terminated C string representation of the binary data char *cStringBuffer = malloc(padLength + 1); cStringBuffer[padLength] = '\0'; - while (i < bitLength) { - cStringBuffer[padLength - ++i] = ( (bytes[length - 1 - (i >> 3)] >> (i & 0x7)) & 1 ) ? '1' : '0'; + + while (i < bitLength) + { + ++i; + + cStringBuffer[padLength - i] = ((bytes[length - 1 - (i >> 3)] >> (i & 0x7)) & 1 ) ? '1' : '0'; } - while (i++ < padLength) { + + while (i++ < padLength) + { cStringBuffer[padLength - i] = '0'; } @@ -231,6 +237,7 @@ static inline NSString * _bitStringWithBytes(const char *bytes, NSUInteger lengt // Free up memory and return free(cStringBuffer); + return returnString; } |