Commit 5c5834b0 authored by Sergei Golubchik's avatar Sergei Golubchik

*never* put anything with side-effects in an assert() -

asserts can be conditionally compiled out.
parent bdbe7430
...@@ -181,7 +181,8 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength) ...@@ -181,7 +181,8 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength)
} else { } else {
char buff[2*_MAX_PATH]; char buff[2*_MAX_PATH];
assert(getcwd(buff, _MAX_PATH) != NULL); p= getcwd(buff, _MAX_PATH);
assert(p);
strcat(buff,"/"); strcat(buff,"/");
strcat(buff, relPath); strcat(buff, relPath);
strncpy(absPath, buff, maxLength); strncpy(absPath, buff, maxLength);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment