diff options
author | David Walter Seikel | 2014-01-29 22:06:08 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-29 22:06:08 +1000 |
commit | 1ef33ef64584a8b6e60a3b34d781bd1a1c06ad93 (patch) | |
tree | c3f5ac1c57b6c1ee74b44208ca4af40d841ea36d | |
parent | Fix memory corruption. (diff) | |
download | boxes-1ef33ef64584a8b6e60a3b34d781bd1a1c06ad93.zip boxes-1ef33ef64584a8b6e60a3b34d781bd1a1c06ad93.tar.gz boxes-1ef33ef64584a8b6e60a3b34d781bd1a1c06ad93.tar.bz2 boxes-1ef33ef64584a8b6e60a3b34d781bd1a1c06ad93.tar.xz |
Fix parsing the final CSI parameter.
-rw-r--r-- | boxes.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2023,11 +2023,13 @@ TODO So abort the current CSI and start from scratch. | |||
2023 | // So we know when we get to the end of parameter space. | 2023 | // So we know when we get to the end of parameter space. |
2024 | t = rindex("01234567890:;<=>?", buffer[j + 1]); | 2024 | t = rindex("01234567890:;<=>?", buffer[j + 1]); |
2025 | // See if we passed a paremeter. | 2025 | // See if we passed a paremeter. |
2026 | if ((';' == buffer[j]) || (NULL == t)) | 2026 | if ((';' == buffer[j]) || (!t)) |
2027 | { | 2027 | { |
2028 | buffer[j] = 0; | 2028 | // Only stomp on the ; if it's really the ;. |
2029 | if (t) | ||
2030 | buffer[j] = 0; | ||
2029 | // Empty parameters are default parameters, so only deal with non defaults. | 2031 | // Empty parameters are default parameters, so only deal with non defaults. |
2030 | if (';' != buffer[csIndex] || (NULL == t)) | 2032 | if (';' != buffer[csIndex] || (!t)) |
2031 | { | 2033 | { |
2032 | // TODO - Might be ":" in the number somewhere, but we are not expecting any in anything we do. | 2034 | // TODO - Might be ":" in the number somewhere, but we are not expecting any in anything we do. |
2033 | csParams[csCount] = atoi(&buffer[csIndex]); | 2035 | csParams[csCount] = atoi(&buffer[csIndex]); |