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