mirror of
https://github.com/whoahq/whoa.git
synced 2026-08-04 16:04:30 +03:00
fix(util): fix improper handling of BOTTOM in StringToJustify
This commit is contained in:
parent
74bc963a1c
commit
dd3a0f6a81
@ -141,7 +141,7 @@ int32_t StringToJustify(const char* string, uint32_t& justify) {
|
||||
const char* string;
|
||||
};
|
||||
|
||||
static JustifyEntry justifyMap[6] = {
|
||||
static JustifyEntry justifyMap[] = {
|
||||
{ 0x1, "LEFT" },
|
||||
{ 0x2, "CENTER" },
|
||||
{ 0x4, "RIGHT" },
|
||||
@ -150,9 +150,9 @@ int32_t StringToJustify(const char* string, uint32_t& justify) {
|
||||
{ 0x20, "BOTTOM" }
|
||||
};
|
||||
|
||||
for (int32_t i = 0; i < 5; i++) {
|
||||
if (!SStrCmpI(justifyMap[i].string, string, 0x7FFFFFFFu)) {
|
||||
justify = justifyMap[i].value;
|
||||
for (const auto& entry : justifyMap) {
|
||||
if (!SStrCmpI(entry.string, string)) {
|
||||
justify = entry.value;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user