Merge pull request #495 from tofurky/sfp_normalize_nul

Properly handle NULs when normalizing SFP fields
This commit is contained in:
René van Dorst authored and GitHub committed 2026-09-21 08:51:57 +02:00
commit b1961c6955
1 file changed
+1 -1
+1 -1
View File
@@ -95,7 +95,7 @@ bool sfp_read_field(__xdata char *dst, uint8_t sfp, uint8_t start, uint8_t lengt
dst[i] = c; dst[i] = c;
} }
while (length > 0 && dst[--length] == ' ') while (length-- > 0 && (dst[length] == ' ' || dst[length] == NUL))
dst[length] = NUL; dst[length] = NUL;
return true; return true;