aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Peach <mrpeach@users.sourceforge.net>2006-12-04 20:17:03 +0000
committerMartin Peach <mrpeach@users.sourceforge.net>2006-12-04 20:17:03 +0000
commit02b17199a31530fd987ccc8e0d40a885791d6103 (patch)
tree390ea40561bddc27c67de48140b08c6c4f21c168
parenta05693a1d5dff368449166ec07a0e1cd0f38fa86 (diff)
make sure bytes >127 are not interpreted as negative.
svn path=/trunk/externals/mrpeach/; revision=6614
-rwxr-xr-xnet/udpreceive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/udpreceive.c b/net/udpreceive.c
index f5e11a0..2d9ac42 100755
--- a/net/udpreceive.c
+++ b/net/udpreceive.c
@@ -72,7 +72,7 @@ static void udpreceive_read(t_udpreceive *x, int sockfd)
for (i = 0; i < read; ++i)
{
/* convert the bytes in the buffer to floats in a list */
- x->x_msgoutbuf[i].a_w.w_float = (float)x->x_msginbuf[i];
+ x->x_msgoutbuf[i].a_w.w_float = (float)(unsigned char)x->x_msginbuf[i];
}
/* send the list out the outlet */
if (read > 1) outlet_list(x->x_msgout, &s_list, read, x->x_msgoutbuf);