commit | 9bca0e622d615fa4411a451cb074b0e43828c657 | [log] [tgz] |
---|---|---|
author | rita <rita@exm.com> | Wed Jan 03 14:29:37 2024 +0800 |
committer | rita <rita@exm.com> | Wed Jan 03 14:29:37 2024 +0800 |
tree | bae076a2560d06591d48871b6a63df31f0d3fdc6 | |
parent | c1a545453d672e2dab15523abb03cce7fa317980 [diff] |
[Bugfix][T106BUG-455]fix temp error Only Configure:No, Affected branch:master, Affected module:temp Is it affected on both ZXIC and MTK:only ZXIC, Self-test:Yes, Doc Update:NO. Change-Id: I8c98d2a8d4d9aaf46699415db5169c51d9103e59
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/src/lynq_qser_thermal.c b/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/src/lynq_qser_thermal.c index 41e5dac..30114f0 100755 --- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/src/lynq_qser_thermal.c +++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-thermal/src/lynq_qser_thermal.c
@@ -4,11 +4,13 @@ void parseBuffer(const char *buf, int *numbers, int *count) { int i = 0; - int num = 0; + while (buf[i] != '\0') { while (buf[i] == ' ' || buf[i] == '\n') { ++i; } + + int num = 0; while (buf[i] >= '0' && buf[i] <= '9') { num = num * 10 + (buf[i] - '0');