Browse Source

Fix unicode invalid skip error in AssetLib

(cherry picked from commit 0caaaf4018feddb1d3e6e75870df282715efd276)
Haoyu Qiu 4 years ago
parent
commit
859dba0dd6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      core/io/http_client.cpp

+ 3 - 1
core/io/http_client.cpp

@@ -691,8 +691,10 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
 					body_left -= rec;
 				}
 			}
-			if (err != OK)
+			if (err != OK) {
+				ret.resize(_offset);
 				break;
+			}
 		}
 	}