]> rtime.felk.cvut.cz Git - coffee/mt-apps.git/commitdiff
Uses letters in test identifiers, not only numbers
authorMichal Sojka <michal.sojka@cvut.cz>
Mon, 19 Aug 2019 10:47:33 +0000 (12:47 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Mon, 19 Aug 2019 10:47:33 +0000 (12:47 +0200)
This helps in catching errors where strings (IDs) are incorrectly used
as numbers.

mt_sim.c

index 73bd26c72c953c77ad9aaab99f422d3f24fb15ab..7606a4cb61b035a628f8c75bd35bfc9fc1bcf668 100644 (file)
--- a/mt_sim.c
+++ b/mt_sim.c
@@ -27,6 +27,7 @@ static void stdin_cb(EV_P_ ev_io *w, int revents)
         memset(uid, 0, sizeof(uid));
         for (int i = 0; i < 14; i++)
             uid[i] = ch;
+        uid[13] = 'A';
        rfid_json_print(pipefd, 42, 32, uid, (strlen(uid)+1)/2);
        break;
     }