Skip to content
Browse files

Now handling negative values

  • Loading branch information...
1 parent c1ed8c7 commit d8e9fdfc4da55e8b347b9ddaf7b6c445ae6c6bda etsyuser committed Feb 3, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 coffeed.c
View
7 coffeed.c
@@ -55,7 +55,12 @@ static int handle_request(
printf("\n");
*/
- unsigned int v = buf[4] + (256 * buf[5]);
+ int v = buf[4] + (256 * buf[5]);
+
+ // Check to see if the value is negative
+ if(0x05 == buf[1])
+ v = -v;
+
char value[128];
memset(value, 0x00, 32);

0 comments on commit d8e9fdf

Please sign in to comment.
Something went wrong with that request. Please try again.