mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-14 15:15:04 -04:00
Switch AMI NVAR parser to Kaitai
This commit is contained in:
parent
2d1ebcc11b
commit
7eb565d788
17 changed files with 1330 additions and 411 deletions
|
@ -113,12 +113,10 @@ UString uFromUcs2(const char* str, size_t max_len)
|
|||
UString msg;
|
||||
const char *str8 = str;
|
||||
size_t rest = (max_len == 0) ? SIZE_MAX : max_len;
|
||||
if (max_len == 0) {
|
||||
while (str8[0] && rest) {
|
||||
msg += str8[0];
|
||||
str8 += 2;
|
||||
rest--;
|
||||
}
|
||||
while (str8[0] && rest) {
|
||||
msg += str8[0];
|
||||
str8 += 2;
|
||||
rest--;
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue