Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Now handling negative values

  • Loading branch information...
commit d8e9fdfc4da55e8b347b9ddaf7b6c445ae6c6bda 1 parent c1ed8c7
etsyuser authored
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);
Please sign in to comment.
Something went wrong with that request. Please try again.