void-packages/srcpkgs/lshw/patches/fix-array-bounds.patch
Jürgen Buchmüller 54900d99f5 lshw: unbreak musl
2016-05-07 05:42:01 +02:00

13 lines
421 B
Diff

Fix GCC warning "array subscript is above array bounds [-Warray-bounds]"
--- src/core/dmi.cc 2016-05-06 22:17:33.416045355 +0200
+++ src/core/dmi.cc 2016-05-06 22:21:31.694032471 +0200
@@ -511,7 +511,7 @@
if (num <= 0x0A)
return _(memory_array_location[num]);
if (num >= 0xA0 && num < 0xA4)
- return _(jp_memory_array_location[num]);
+ return _(jp_memory_array_location[num - 0xA0]);
return "";
}