summaryrefslogtreecommitdiff
path: root/str
diff options
context:
space:
mode:
authorSoikk2025-11-07 00:42:39 +0100
committerSoikk2025-11-07 00:42:39 +0100
commitf40084deee940dd3ca21aadd79d8ddc058323ac4 (patch)
tree79a478a241278071a654c04f39a37555ac2e8250 /str
parent71c6daf9c73d073833eda791240f5fae22b645c6 (diff)
downloadsoikk-libs-f40084deee940dd3ca21aadd79d8ddc058323ac4.tar.xz
soikk-libs-f40084deee940dd3ca21aadd79d8ddc058323ac4.tar.zst
Added NULL check
Diffstat (limited to 'str')
-rwxr-xr-xstr/str.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/str/str.c b/str/str.c
index 052ec48..18b8e74 100755
--- a/str/str.c
+++ b/str/str.c
@@ -358,6 +358,7 @@ str file_to_nstr(char *filename, u32 len){
void str_to_file(str s, char *filename){
FILE *fp = fopen(filename, "r");
+ if(fp == NULL) return;
str_to_fp(s, fp);
fclose(fp);
}