diff --git a/papyrus-vm/src/papyrus-vm-lib/ActivePexInstance.cpp b/papyrus-vm/src/papyrus-vm-lib/ActivePexInstance.cpp index 206fdab587..56bf9f6e9d 100644 --- a/papyrus-vm/src/papyrus-vm-lib/ActivePexInstance.cpp +++ b/papyrus-vm/src/papyrus-vm-lib/ActivePexInstance.cpp @@ -201,7 +201,7 @@ void ActivePexInstance::ExecuteOpCode(ExecutionContext* ctx, uint8_t op, agctx.AddUnsigned(args.size()); auto g = agctx.AddLambdaWithRef([&args]() { std::stringstream ss; - ss << "size = " << args.size() << "\n["; + ss << "size = " << args.size() << "\n[\n"; for (const auto& arg : args) { ss << " " << (arg ? arg->ToString() : "(null)") << "\n"; } @@ -733,11 +733,12 @@ VarValue ActivePexInstance::ExecuteAll( agctx.AddMessage("next: stack id, line"); agctx.AddUnsigned(ctx.stackData->stackIdHolder.GetStackId()); agctx.AddUnsigned(ctx.line); - // auto g = agctx.AddLambdaWithRef([&ctx]() { - // std::string s = "ExecutionContext:\n"; - // return s; - // }); - // g.Arm(); + auto g = agctx.AddLambdaWithRef([&ctx]() { + std::string s = "ExecutionContext:\n"; + ctx.locals; + return s; + }); + g.Arm(); auto pipex = sourcePex.fn(); // XXX ??? @@ -780,8 +781,9 @@ VarValue ActivePexInstance::StartFunction(FunctionInfo& function, throw std::runtime_error("An empty stackData passed to StartFunction"); } - auto g = agctx.AddLambdaWithRef([&function]() { + auto g = agctx.AddLambdaWithRef([this, &function]() { std::stringstream ss; + ss << "source pex = " << GetSourcePexName() << "\n"; ss << "return = " << function.returnType << "\n"; ss << "docstring = " << function.docstring << "\n"; ss << "userFlags = " << std::hex << function.userFlags << "\n"; diff --git a/skymp5-server/cpp/server_guest_lib/PartOne.cpp b/skymp5-server/cpp/server_guest_lib/PartOne.cpp index adbd8a1695..78fcf65c33 100644 --- a/skymp5-server/cpp/server_guest_lib/PartOne.cpp +++ b/skymp5-server/cpp/server_guest_lib/PartOne.cpp @@ -411,8 +411,8 @@ void PartOne::HandlePacket(void* partOneInstance, Networking::UserId userId, s += "..."; break; } - s += "0123456789abcdef"[data[i] & 0x10]; - s += "0123456789abcdef"[data[i] & 0x01]; + s += "0123456789abcdef"[(data[i] & 0xf0) >> 8]; + s += "0123456789abcdef"[data[i] & 0x0f]; } return s; });