[efi] set UEFI mode when a pure EFI ISO is selected

* Closes #168
* Also fix various VS Code Analysis warnings
This commit is contained in:
Pete Batard 2013-12-22 20:48:57 +00:00
parent 63e1fe3d55
commit 24e73c5e10
7 changed files with 38 additions and 23 deletions

View file

@ -380,12 +380,13 @@ BOOL dispatch_loc_cmd(loc_cmd* lcmd)
if (lcmd->command <= LC_TEXT) {
// Any command up to LC_TEXT takes a control ID in text[0]
if (safe_strncmp(lcmd->txt[0], msg_prefix, 4) == 0) {
if (lcmd->command != LC_TEXT) {
// The unneeded NULL check is to silence a VS warning
if ((lcmd->txt[0] == NULL) || (lcmd->command != LC_TEXT)) {
luprint("only the [t]ext command can be applied to a message (MSG_###)\n");
goto err;
}
// Try to convert the numeric part of a MSG_#### to a numeric
lcmd->ctrl_id = MSG_000 + atoi(&lcmd->txt[0][4]);
lcmd->ctrl_id = MSG_000 + atoi(&(lcmd->txt[0][4]));
if (lcmd->ctrl_id == MSG_000) {
// Conversion could not be performed
luprintf("failed to convert the numeric value in '%'\n", lcmd->txt[0]);