fix async readdir
authorIgor Zinkovsky <igorzi@microsoft.com>
Sat, 3 Sep 2011 06:54:13 +0000 (23:54 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Sun, 4 Sep 2011 00:44:54 +0000 (17:44 -0700)
src/node_file.cc

index 128ac51e33f0f0dd7c3fb954a598b97e34912f1b..926dcd667a2b57b5f08ae81c95a77357059dd6ec 100644 (file)
@@ -162,10 +162,13 @@ static void After(uv_fs_t *req) {
           for (int i = 0; i < nnames; i++) {
             Local<String> name = String::New(namebuf);
             names->Set(Integer::New(i), name);
+#ifndef NDEBUG
             namebuf += strlen(namebuf);
             assert(*namebuf == '\0');
             namebuf += 1;
+#else
             namebuf += strlen(namebuf) + 1;
+#endif
           }
 
           argv[1] = names;