blueloveTH 3 年之前
父節點
當前提交
1a2153e5b4

+ 1 - 1
plugins/flutter/CHANGELOG.md

@@ -25,6 +25,6 @@ The initial version. Hello, world!
 + Add `math.isnan` and `math.isinf`
 + Fix a bug of `__checkType`
 
-## 0.5.0+1
+## 0.5.0+2
 
 + Fix a bug on Windows

+ 1 - 1
plugins/flutter/pubspec.yaml

@@ -1,6 +1,6 @@
 name: pocketpy
 description: A lightweight Python interpreter for game engines.
-version: 0.5.0+1
+version: 0.5.0+2
 homepage: https://pocketpy.dev
 repository: https://github.com/blueloveth/pocketpy
 

+ 2 - 1
plugins/flutter/src/pocketpy.h

@@ -399,7 +399,8 @@ public:
     _Str __lstrip() const {
         std::string copy(*_s);
         copy.erase(copy.begin(), std::find_if(copy.begin(), copy.end(), [](char c) {
-            return !std::isspace(c);
+            // std::isspace(c) does not working on windows (Debug)
+            return c != ' ' && c != '\t' && c != '\r' && c != '\n';
         }));
         return _Str(copy);
     }

+ 1 - 1
plugins/godot/godot-cpp

@@ -1 +1 @@
-Subproject commit d8e7e9986433707a21b796d510cccb6f098cf91c
+Subproject commit 764a0a18407dad82e0ad7a878bab42097bfa1647

+ 2 - 1
plugins/unity/com.bl.pocketpy/Plugins/iOS/pocketpy.h

@@ -399,7 +399,8 @@ public:
     _Str __lstrip() const {
         std::string copy(*_s);
         copy.erase(copy.begin(), std::find_if(copy.begin(), copy.end(), [](char c) {
-            return !std::isspace(c);
+            // std::isspace(c) does not working on windows (Debug)
+            return c != ' ' && c != '\t' && c != '\r' && c != '\n';
         }));
         return _Str(copy);
     }

+ 2 - 1
src/str.h

@@ -198,7 +198,8 @@ public:
     _Str __lstrip() const {
         std::string copy(*_s);
         copy.erase(copy.begin(), std::find_if(copy.begin(), copy.end(), [](char c) {
-            return !std::isspace(c);
+            // std::isspace(c) does not working on windows (Debug)
+            return c != ' ' && c != '\t' && c != '\r' && c != '\n';
         }));
         return _Str(copy);
     }