From: Peter Zotov Date: Fri, 8 Apr 2011 15:08:02 +0000 (+0400) Subject: Compare chip IDs correctly. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=12e13cd08a883432de63284210ecd4a6ed733eb9;p=fw%2Fstlink Compare chip IDs correctly. --- diff --git a/src/gdb-server.c b/src/gdb-server.c index c05386b..777da3b 100644 --- a/src/gdb-server.c +++ b/src/gdb-server.c @@ -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; }