From 7596a4165b90d0933a0ab4b1ad4b98b003016872 Mon Sep 17 00:00:00 2001 From: David Betz Date: Sun, 8 Feb 2015 20:39:53 -0500 Subject: [PATCH] Fix an ugly bug in a call to set_reset_method. --- p1load.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/p1load.c b/p1load.c index 413af33..a8b7021 100644 --- a/p1load.c +++ b/p1load.c @@ -121,7 +121,11 @@ int main(int argc, char *argv[]) state.rx_timeout = cb_rx_timeout; state.progress = cb_progress; #ifdef RASPBERRY_PI - use_reset_method("gpio,17,0"); +{ + char cmd[20] = "gpio,17,0"; + // use_reset_method uses strtok to parse the string so it can't be a constant + use_reset_method(cmd); +} #endif /* process the position-independent arguments */