mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-29 12:56:37 +08:00
Fix two minor issues.
This commit is contained in:
parent
2c9dffd4c0
commit
c417958a42
@ -1575,7 +1575,7 @@ static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h)
|
|||||||
// magnitude code followed by receive_extend code
|
// magnitude code followed by receive_extend code
|
||||||
int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits);
|
int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits);
|
||||||
int m = 1 << (magbits - 1);
|
int m = 1 << (magbits - 1);
|
||||||
if (k < m) k += (-1 << magbits) + 1;
|
if (k < m) k += (0xFFFFFFFF << magbits) + 1;
|
||||||
// if the result is small enough, we can fit it in fast_ac table
|
// if the result is small enough, we can fit it in fast_ac table
|
||||||
if (k >= -128 && k <= 127)
|
if (k >= -128 && k <= 127)
|
||||||
fast_ac[i] = (stbi__int16) ((k << 8) + (run << 4) + (len + magbits));
|
fast_ac[i] = (stbi__int16) ((k << 8) + (run << 4) + (len + magbits));
|
||||||
|
@ -366,6 +366,8 @@ void kbd_display(const char* name, const char* initialInput, void* data, void (*
|
|||||||
ui_view* view = (ui_view*) calloc(1, sizeof(ui_view));
|
ui_view* view = (ui_view*) calloc(1, sizeof(ui_view));
|
||||||
if(view == NULL) {
|
if(view == NULL) {
|
||||||
error_display(NULL, NULL, NULL, "Failed to allocate UI view.");
|
error_display(NULL, NULL, NULL, "Failed to allocate UI view.");
|
||||||
|
|
||||||
|
free(kbdData);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user