Use forward slashes to load lime.ndll.

`substr(7)` returns the substring _starting_ at character 7, which will never be "windows". The author meant to type `substr(0, 7)` instead, to get the substring ending at 7.

We could easily make this change, but given that the code has been successfully using forward slashes for several years, I prefer to simplify.
This commit is contained in:
player-03
2023-04-01 11:56:41 -04:00
committed by GitHub
parent fa49cf1a2a
commit 4d3ae39d50

View File

@@ -149,16 +149,15 @@ class CFFI
if (result == null)
{
var slash = (__sysName().substr(7).toLowerCase() == "windows") ? "\\" : "/";
var haxelib = __findHaxelib("lime");
if (haxelib != "")
{
result = __tryLoad(haxelib + slash + "ndll" + slash + __sysName() + slash + library, library, method, args);
result = __tryLoad(haxelib + "/ndll/" + __sysName() + "/" + library, library, method, args);
if (result == null)
{
result = __tryLoad(haxelib + slash + "ndll" + slash + __sysName() + "64" + slash + library, library, method, args);
result = __tryLoad(haxelib + "/ndll/" + __sysName() + "64/" + library, library, method, args);
}
}
}