From 4d20e71c80b61f96ca398110f046ead8d004ee1b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 11 Nov 2021 17:04:29 -0800 Subject: gracefully handle missing definition --- src/lua.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lua.c') diff --git a/src/lua.c b/src/lua.c index 5c484b9..e75ba92 100644 --- a/src/lua.c +++ b/src/lua.c @@ -314,6 +314,7 @@ void write_definition_to_file (lua_State *L, char *name, char *outfilename) { lua_getfield(L, -1, name); const char *contents = lua_tostring(L, -1); lua_pop(L, 1); + if (contents == NULL) return; int outfd = open(outfilename, O_WRONLY|O_CREAT|O_TRUNC, 0644); write(outfd, contents, strlen(contents)); close(outfd); -- cgit 1.4.1-2-gfad0 ct name='h' onchange='this.form.submit();'> Profanity fork with TTY improvementsdanisanti <danisanti@tilde.institute>
about summary refs log blame commit diff stats
path: root/tests/unittests/test_cmd_roster.c
blob: ecd9b2e2a9dc35493e55eaa597aca4ce53b14ef9 (plain) (tree)
1
2
3
4
5
6
7
8
9