restore correct datatype

This commit is contained in:
2022-01-16 19:54:06 +01:00
parent 01e700af54
commit a45423692e
3 changed files with 3 additions and 3 deletions

2
ml.cpp
View File

@@ -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);
}