summaryrefslogtreecommitdiff
path: root/appl/lib
diff options
context:
space:
mode:
Diffstat (limited to 'appl/lib')
-rw-r--r--appl/lib/names.b2
1 files changed, 2 insertions, 0 deletions
diff --git a/appl/lib/names.b b/appl/lib/names.b
index 8a0db807..d3a2082e 100644
--- a/appl/lib/names.b
+++ b/appl/lib/names.b
@@ -119,6 +119,8 @@ rooted(root: string, name: string): string
isprefix(a: string, b: string): int
{
la := len a;
+ if(la == 0)
+ return 0; # "" isnt' a pathname
while(la > 1 && a[la-1] == '/')
a = a[0:--la];
lb := len b;