Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix time phrasing nul character bug

  • Loading branch information...
commit 953617505244b65d623506a99f1d471bd9fbb64e 1 parent 96c7acb
@glynhudson glynhudson authored
View
2  NanodeRF_Power_RTCrelay_GLCDtemp/NanodeRF_Power_RTCrelay_GLCDtemp.ino
@@ -283,7 +283,7 @@ static void my_callback (byte status, word off, word len) {
Serial.print("Time: ");
Serial.println(line_buf);
- char tmp[] = {line_buf[1],line_buf[2]};
+ char tmp[] = {line_buf[1],line_buf[2],0};
byte hour = atoi(tmp);
tmp[0] = line_buf[4]; tmp[1] = line_buf[5];
byte minute = atoi(tmp);
View
2  NanodeRF_multinode/NanodeRF_multinode.ino
@@ -245,7 +245,7 @@ static void my_callback (byte status, word off, word len) {
Serial.print("Time: ");
Serial.println(line_buf);
- char tmp[] = {line_buf[1],line_buf[2]};
+ char tmp[] = {line_buf[1],line_buf[2],0};
byte hour = atoi(tmp);
tmp[0] = line_buf[4]; tmp[1] = line_buf[5];
byte minute = atoi(tmp);
Please sign in to comment.
Something went wrong with that request. Please try again.