]> sigrok.org Git - libsigrok.git/commit
metex14: Fix parsing of measurement flags.
authorAlexandru Gagniuc <redacted>
Fri, 30 Nov 2012 19:11:04 +0000 (13:11 -0600)
committerUwe Hermann <redacted>
Sun, 2 Dec 2012 13:21:18 +0000 (14:21 +0100)
commit3ebc9b59a2e2b96ad95dbfdf3218c3b3b00940ef
tree3aa682b0b8efbde9f750c07026d368e189f7cf5e
parente82d7dbc202794dc30abdb4e50cfb4507f49025e
metex14: Fix parsing of measurement flags.

strcmp(buf + 9, "  mA") does not work because buf is CR-terminated,
while "  mA" is NUL-terminated.

Drop ambiguities arising from the termination of the strings, and
only compare the characters we care about, using strncmp().

Signed-off-by: Alexandru Gagniuc <redacted>
hardware/common/dmm/metex14.c