From 02b17199a31530fd987ccc8e0d40a885791d6103 Mon Sep 17 00:00:00 2001 From: Martin Peach Date: Mon, 4 Dec 2006 20:17:03 +0000 Subject: make sure bytes >127 are not interpreted as negative. svn path=/trunk/externals/mrpeach/; revision=6614 --- net/udpreceive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/udpreceive.c') 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); -- cgit v1.2.1