From b50d20272ff9276d8edf7e509b0cca57e95914b1 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Tue, 16 Feb 2010 11:41:53 -0700 Subject: [PATCH] now able to accept c-packets w/o a space following the number --- collector.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/collector.cpp b/collector.cpp index 1e4264f..408b534 100644 --- a/collector.cpp +++ b/collector.cpp @@ -71,7 +71,7 @@ void noticeCollector(u8 * packet) { char dir; int in; int out; - if (packetScanf(packet, "c%d ", &count) != 3) { + if (packetScanf(packet, "c%d", &count) != 2) { pprintf("L bad '%#p'\n",packet); return; } @@ -82,8 +82,10 @@ void noticeCollector(u8 * packet) { int path_ind = 0; char ch; while(packetScanf(packet, "%c", &ch)) { // extract the return path - collector.path[path_ind] = ch; - ++path_ind; + if (ch != ' ') { + collector.path[path_ind] = ch; + ++path_ind; + } } collector.path[path_ind] = '\0'; collector.update_coords(); // update (x,y) coordinates -- 2.11.4.GIT