local: Fix condition in local_dump_image
This commit is contained in:
1 parent
6a6a6348f5
commit
912ec5210e
1 file changed
+2
-2
+2
-2
@@ -165,7 +165,7 @@ int local_dump_image(enum image_type image, const char * file) {
|
|||||||
|
|
||||||
if ( device == DEVICE_RX_51 ) {
|
if ( device == DEVICE_RX_51 ) {
|
||||||
|
|
||||||
if ( image < sizeof(nanddump_n900)/sizeof(nanddump_n900[0]) || ! nanddump_n900[image].valid ) {
|
if ( image >= sizeof(nanddump_n900)/sizeof(nanddump_n900[0]) || ! nanddump_n900[image].valid ) {
|
||||||
ERROR("Unsuported image type: %s", image_type_to_string(image));
|
ERROR("Unsuported image type: %s", image_type_to_string(image));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,7 @@ int local_dump_image(enum image_type image, const char * file) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if ( image < sizeof(nanddump)/sizeof(nanddump[0]) || ! nanddump[image].valid ) {
|
if ( image >= sizeof(nanddump)/sizeof(nanddump[0]) || ! nanddump[image].valid ) {
|
||||||
ERROR("Unsuported image type: %s", image_type_to_string(image));
|
ERROR("Unsuported image type: %s", image_type_to_string(image));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user