diff --git a/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.cpp b/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.cpp index a207371a02..bf1b166505 100644 --- a/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.cpp +++ b/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.cpp @@ -213,7 +213,7 @@ void MinXmlHttpRequest::handle_requestResponse(cocos2d::network::HttpClient *sen if (!response->isSucceed()) { std::string errorBuffer = response->getErrorBuffer(); - CCLOG("Response failed, error buffer: %s", errorBuffer); + CCLOG("Response failed, error buffer: %s", errorBuffer.c_str()); if (statusCode == 0 || statusCode == -1) { _errorFlag = true;