restore correct datatype
This commit is contained in:
2
ml.cpp
2
ml.cpp
@@ -1816,7 +1816,7 @@ MlValue string_find(std::vector<MlValue> args, MlEnvironment &env) {
|
||||
throw MlError(MlValue("string-find", string_find), env, args.size() > 3 ? TOO_MANY_ARGS : TOO_FEW_ARGS);
|
||||
|
||||
size_t start_pos = args.size() > 2 ? args[2].as_int() : 0;
|
||||
size_t pos = string_find_substr(args[0].as_string(), args[1].as_string(), start_pos);
|
||||
long pos = string_find_substr(args[0].as_string(), args[1].as_string(), start_pos);
|
||||
|
||||
return pos == -1 ? MlValue::nil() : MlValue((long) pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user