From: henryk@ploetzli.ch Date: Thu, 3 Dec 2009 16:21:44 +0000 (+0000) Subject: Limit hexsamples to just the amount of requested samples X-Git-Tag: v1.0.0~448 X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/78d647da02c48dcdc4d93ee621f578aaa4d1c005 Limit hexsamples to just the amount of requested samples --- diff --git a/winsrc/command.cpp b/winsrc/command.cpp index 45683074..0214a0ab 100644 --- a/winsrc/command.cpp +++ b/winsrc/command.cpp @@ -909,9 +909,12 @@ static void CmdHexsamples(char *str) { int i; int n; + int requested = atoi(str); + int delivered = 0; if(atoi(str) == 0) { n = 12; + requested = 12; } else { n = atoi(str)/4; } @@ -939,7 +942,12 @@ static void CmdHexsamples(char *str) c.d.asBytes[j+7], c.d.asBytes[j+8] ); + delivered += 8; + if(delivered >= requested) + break; } + if(delivered >= requested) + break; } }