about summary refs log tree commit diff stats
path: root/src/tlv.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-12-11 10:18:41 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-12-11 10:22:53 -0800
commitc0c9d3168873deb063721d3ba5db2205862d0547 (patch)
tree3423fe0d8dc95a8380e8c4634179cd3c947ee262 /src/tlv.c
parentd5038fe51424971c0d7cd81336de19be5f85b7c6 (diff)
downloadteliva-c0c9d3168873deb063721d3ba5db2205862d0547.tar.gz
snapshot: migrate all sample apps to new format
Diffstat (limited to 'src/tlv.c')
-rw-r--r--src/tlv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tlv.c b/src/tlv.c
index adf21c3..5800418 100644
--- a/src/tlv.c
+++ b/src/tlv.c
@@ -89,7 +89,9 @@ static void teliva_load_definition(lua_State* L, FILE* in) {
         strcpy(line, "-\n");
       }
       else {
-        assert(fgets(line, 1024, in));
+        memset(line, '\0', 1024);
+//?         printf("%d\n", feof(in));
+        fgets(line, 1024, in);
 //?         printf("new line: %s", line);
       }
     }