https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5bfe6a5376cf3145ece2c…
commit 5bfe6a5376cf3145ece2ce9d7f790b31ec23684e
Author: Andrew Cook <ariscop(a)gmail.com>
AuthorDate: Sat Feb 9 15:08:08 2019 +1100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Feb 9 11:53:55 2019 +0100
[mvdm] Fix missing pointer dereference
Original code compared against the pointer value rather
than the first byte
---
subsystems/mvdm/ntvdm/console/console.c | 2 +-
subsystems/mvdm/ntvdm/emulator.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/subsystems/mvdm/ntvdm/console/console.c
b/subsystems/mvdm/ntvdm/console/console.c
index db2a4682735..7901a25dad7 100644
--- a/subsystems/mvdm/ntvdm/console/console.c
+++ b/subsystems/mvdm/ntvdm/console/console.c
@@ -169,7 +169,7 @@ UpdateVdmMenuDisks(VOID)
if (GlobalSettings.FloppyDisks[i].Length != 0 &&
GlobalSettings.FloppyDisks[i].Buffer &&
- GlobalSettings.FloppyDisks[i].Buffer != L'\0')
+ *GlobalSettings.FloppyDisks[i].Buffer != L'\0')
{
/* Update item text */
_snwprintf(szMenuString2, ARRAYSIZE(szMenuString2), szMenuString1, i,
GlobalSettings.FloppyDisks[i].Buffer);
diff --git a/subsystems/mvdm/ntvdm/emulator.c b/subsystems/mvdm/ntvdm/emulator.c
index 2a6b186f277..68ff9f3cba8 100644
--- a/subsystems/mvdm/ntvdm/emulator.c
+++ b/subsystems/mvdm/ntvdm/emulator.c
@@ -592,7 +592,7 @@ BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput)
{
if (GlobalSettings.FloppyDisks[i].Length != 0 &&
GlobalSettings.FloppyDisks[i].Buffer &&
- GlobalSettings.FloppyDisks[i].Buffer != '\0')
+ *GlobalSettings.FloppyDisks[i].Buffer != L'\0')
{
if (!MountDisk(FLOPPY_DISK, i, GlobalSettings.FloppyDisks[i].Buffer, FALSE))
{
@@ -611,7 +611,7 @@ BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput)
{
if (GlobalSettings.HardDisks[i].Length != 0 &&
GlobalSettings.HardDisks[i].Buffer &&
- GlobalSettings.HardDisks[i].Buffer != L'\0')
+ *GlobalSettings.HardDisks[i].Buffer != L'\0')
{
if (!MountDisk(HARD_DISK, i, GlobalSettings.HardDisks[i].Buffer, FALSE))
{