summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/file.c b/file.c
index d4a24dd126..0310f235ca 100644
--- a/file.c
+++ b/file.c
@@ -3456,9 +3456,10 @@ rmext(const char *p, long l0, long l1, const char *e)
{
long l2;
- if (!e || !l2) return 0;
+ if (!e) return 0;
l2 = strlen(e);
+ if (!l2) return 0;
if (l2 == 2 && e[1] == '*') {
unsigned char c = *e;
e = p + l1;