Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
nic11 committed Jan 15, 2025
1 parent 276af65 commit 6e40e04
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions papyrus-vm/src/papyrus-vm-lib/ActivePexInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down Expand Up @@ -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 ???

Expand Down Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions skymp5-server/cpp/server_guest_lib/PartOne.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down

0 comments on commit 6e40e04

Please sign in to comment.