Skip to content

Commit

Permalink
more appropriate pyzpc input check
Browse files Browse the repository at this point in the history
  • Loading branch information
littlemine committed Oct 10, 2024
1 parent 1fba4ad commit ab88de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/PyZpc/pyzfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ struct PyZfx : INode {
if (PyDict_SetItemString(zenoModDict, "_args", argsDict) < 0)
throw makeError("failed to set zpy._args");

if (has_input("code")) { // path.empty()
auto code = get_input2<std::string>("code");
auto code = get_input2<std::string>("code");
if (!code.empty()) { // path.empty()
auto tmpFile = zs::abs_exe_directory() + "/__pyzfx__zstmp.py";
if (std::FILE* f = std::fopen(tmpFile.c_str(), "w")) {
std::fwrite(code.data(), sizeof(char), code.size(), f);
Expand Down

0 comments on commit ab88de4

Please sign in to comment.