File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -194,8 +194,10 @@ bool ArgParser::initPlatformDir() {
194
194
if (!found) { // try via PATH search
195
195
logMsg (" initPlatformDir: trying to find executable on PATH" );
196
196
std::string location = findOnPath (platformDir.c_str ());
197
- strncpy (path, location.c_str (), PATH_MAX);
198
- found = true ;
197
+ if (location.size () > 0 ) {
198
+ strncpy (path, location.c_str (), PATH_MAX);
199
+ found = true ;
200
+ }
199
201
}
200
202
201
203
// Check if bin/jruby file exists; this logs a message if not found
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ string findOnPath(const char* name) {
144
144
145
145
start = sep + 1 ;
146
146
}
147
- return NULL ;
147
+ return " " ;
148
148
}
149
149
150
150
const char * getSysError (char *str, int strSize) {
You can’t perform that action at this time.
0 commit comments