summary refs log tree commit diff stats
path: root/hw/scsi/mptconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi/mptconfig.c')
-rw-r--r--hw/scsi/mptconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/mptconfig.c b/hw/scsi/mptconfig.c
index 707185469e..3e4f400115 100644
--- a/hw/scsi/mptconfig.c
+++ b/hw/scsi/mptconfig.c
@@ -158,7 +158,7 @@ static size_t mptsas_config_pack(uint8_t **data, const char *fmt, ...)
     va_end(ap);
 
     if (data) {
-        assert(ret < 256 && (ret % 4) == 0);
+        assert(ret / 4 < 256 && (ret % 4) == 0);
         stb_p(*data + 1, ret / 4);
     }
     return ret;