void-packages/srcpkgs/lshw/patches/fix-array-bounds.patch

14 lines
421 B
Diff
Raw Normal View History

2016-05-07 05:40:35 +02:00
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 "";
}