summaryrefslogtreecommitdiffhomepage
path: root/digital/ucoolib/ucoolib/intf
diff options
context:
space:
mode:
authorNicolas Schodet2012-12-13 19:42:07 +0100
committerNicolas Schodet2012-12-18 22:33:08 +0100
commit1f410aa3d245ceef590bdcf981e67b39e794b0a9 (patch)
tree540bcb63114ae78481a5da613391d6899ad624c1 /digital/ucoolib/ucoolib/intf
parent1d22f2a89891445ac6e3353bff20ff3701685424 (diff)
digital/ucoolib/ucoolib/intf: fix for signed char
When promoting a char to int, if char is signed (which is implementation dependant), there is sign extension. We do not want that.
Diffstat (limited to 'digital/ucoolib/ucoolib/intf')
-rw-r--r--digital/ucoolib/ucoolib/intf/stream.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/digital/ucoolib/ucoolib/intf/stream.cc b/digital/ucoolib/ucoolib/intf/stream.cc
index 8f73925f..356936d4 100644
--- a/digital/ucoolib/ucoolib/intf/stream.cc
+++ b/digital/ucoolib/ucoolib/intf/stream.cc
@@ -43,7 +43,7 @@ Stream::getc ()
char c;
r = read (&c, 1);
if (r == 1)
- return c;
+ return static_cast<unsigned char> (c);
else
return -1;
}