Scope-eye.net Git Repository
/
liskon_frotz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a90a40b
)
Fix for Frotz tries too hard to read game files. #35.
author
David Griffith
<dave@661.org>
Wed, 22 Feb 2017 13:30:01 +0000
(
05:30
-0800)
committer
David Griffith
<dave@661.org>
Wed, 22 Feb 2017 13:30:01 +0000
(
05:30
-0800)
src/curses/ux_blorb.c
patch
|
blob
|
history
diff --git
a/src/curses/ux_blorb.c
b/src/curses/ux_blorb.c
index 5a2daf659bc93523013b7f5984efa96ac187d71e..2a2545c00374aee3a61496192bb766d847b81682 100644
(file)
--- a/
src/curses/ux_blorb.c
+++ b/
src/curses/ux_blorb.c
@@
-87,9
+87,10
@@
bb_err_t ux_blorb_init(char *filename)
len2 = strlen(filename) + strlen(EXT_BLORB3);
mystring = malloc(len2 * sizeof(char) + 1);
- strnc
at
(mystring, filename, len1 * sizeof(char));
+ strnc
py
(mystring, filename, len1 * sizeof(char));
p = rindex(mystring, '.');
- *p = '\0';
+ if (p != NULL)
+ *p = '\0';
strncat(mystring, EXT_BLORB, len1 * sizeof(char));