projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d5225d
)
spv-light-decoder: Use unsigned int, not int, for %x with sscanf().
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 7 Feb 2021 04:13:50 +0000
(20:13 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 7 Feb 2021 04:13:50 +0000
(20:13 -0800)
Found by cppcheck.
Reported by John Darrington.
src/output/spv/spv-light-decoder.c
patch
|
blob
|
history
diff --git
a/src/output/spv/spv-light-decoder.c
b/src/output/spv/spv-light-decoder.c
index 58b5ddbe0294019cf9988c9ec1c1fb402fb12fdb..fb0dd18d6aba1e8b8fc8db04641f5e29a8e5d615 100644
(file)
--- a/
src/output/spv/spv-light-decoder.c
+++ b/
src/output/spv/spv-light-decoder.c
@@
-96,7
+96,7
@@
static char * WARN_UNUSED_RESULT
decode_spvlb_color_string (const char *s, uint8_t def,
struct cell_color *colorp)
{
- int r, g, b;
+
unsigned
int r, g, b;
if (!*s)
r = g = b = def;
else if (sscanf (s, "#%2x%2x%2x", &r, &g, &b) != 3)