diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c index a3fe7d8741..f9c6f5c553 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c @@ -208,7 +208,7 @@ QemuFlashWrite ( // Restore flash to read mode // if (*NumBytes > 0) { - *Ptr = READ_ARRAY_CMD; + *(Ptr - 1) = READ_ARRAY_CMD; } return EFI_SUCCESS;