From 34a415215a1a58f2777e1edae67255e9b45baa51 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 26 Oct 2009 17:17:04 -0700 Subject: Fixing findpath. --- lib/cdutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/cdutils.cpp') diff --git a/lib/cdutils.cpp b/lib/cdutils.cpp index 0b5709a..36032fd 100644 --- a/lib/cdutils.cpp +++ b/lib/cdutils.cpp @@ -530,7 +530,7 @@ struct cdutils::DirEntry cdutils::find_dir_entry(struct DirEntry * dir, String n if (!dir->R) { ptr++; } else { - if (!strncmp(name.to_charp(), (char *) &(dir->id), dir->N)) { + if ((dir->N == name.strlen()) && (!strncmp(name.to_charp(), (char *) &(dir->id), dir->N))) { r = *dir; } ptr += dir->R; -- cgit v1.2.3