Fix issue in serial-bin
Note: this is a classic c error, so it may be interresting to discover why the static analysis tools didn't report this error.
This commit is contained in:
1 parent
14b94865b7
commit
ee2bc27bda
1 file changed
+1
-1
+1
-1
@@ -99,7 +99,7 @@ m_ser1al_bin_read_size(FILE *f, size_t *size)
|
||||
return true;
|
||||
}
|
||||
size_t s = 0;
|
||||
int l = (c = 255) ? 8 : (c == 254) ? 4 : 2;
|
||||
int l = (c == 255) ? 8 : (c == 254) ? 4 : 2;
|
||||
for(int i = 0; i < l; i++) {
|
||||
c = fgetc(f);
|
||||
if (M_UNLIKELY(c == EOF)) return false;
|
||||
|
||||
Reference in new issue
Block a user