Seems hex printf output is buggy with negative value, -1 should give ff and not ffffffff. we go to decimal

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8751 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2004-08-31 17:15:42 +00:00
parent 12379c683f
commit 5b7cb6de0a
1 changed files with 5 additions and 5 deletions

View File

@ -712,10 +712,10 @@ Keymap::SaveAsHeader(entry_ref &ref)
status_t err;
BFile file(&ref, B_WRITE_ONLY | B_CREATE_FILE | B_ERASE_FILE );
if ((err = file.InitCheck()) != B_OK) {
printf("error %s\n", strerror(err));
return;
}
if ((err = file.InitCheck()) != B_OK) {
printf("error %s\n", strerror(err));
return;
}
int fd = file.Dup();
FILE * f = fdopen(fd, "w");
@ -818,7 +818,7 @@ Keymap::SaveAsHeader(entry_ref &ref)
fprintf(f, "const char sSystemKeyChars[] = {\n");
for (uint32 i=0; i<fCharsSize; i++)
fprintf(f, "\t0x%hx,\n", fChars[i]);
fprintf(f, "\t%hhd,\n", fChars[i]);
fprintf(f, "};\n");
}