1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Fix a sign-extension problem for BLOB output in ".insert" mode of the

command-line shell.

FossilOrigin-Name: 282f2a74c23aa3fca6087bdeaf5d961b4f5bbe47
This commit is contained in:
drh
2012-04-24 12:12:57 +00:00
parent 9878123752
commit b202d70a87
3 changed files with 8 additions and 8 deletions

View File

@@ -499,7 +499,7 @@ static void output_hex_blob(FILE *out, const void *pBlob, int nBlob){
int i;
char *zBlob = (char *)pBlob;
fprintf(out,"X'");
for(i=0; i<nBlob; i++){ fprintf(out,"%02x",zBlob[i]); }
for(i=0; i<nBlob; i++){ fprintf(out,"%02x",zBlob[i]&0xff); }
fprintf(out,"'");
}