Compare chip IDs correctly.
authorPeter Zotov <whitequark@whitequark.org>
Fri, 8 Apr 2011 15:08:02 +0000 (19:08 +0400)
committerPeter Zotov <whitequark@whitequark.org>
Fri, 8 Apr 2011 15:08:02 +0000 (19:08 +0400)
src/gdb-server.c

index c05386b9ed05f26625b75adf0508842511e51e45..777da3bfddc63f803223727dcf1ff42a33e81bee 100644 (file)
@@ -72,7 +72,7 @@ int main(int argc, char** argv) {
        const struct chip_params* params = NULL;
 
        for(int i = 0; i < sizeof(devices) / sizeof(devices[0]); i++) {
-               if(devices[i].chip_id == chip_id) {
+               if(devices[i].chip_id == (chip_id & 0xFFF)) {
                        params = &devices[i];
                        break;
                }