Skip to content

Commit

Permalink
fix: rollback some mvalue stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
vadzz-dev committed Mar 19, 2024
1 parent 89b8ad3 commit b5148cc
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 65 deletions.
5 changes: 3 additions & 2 deletions c-api/entities/http_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ void MarshalStringDict(alt::IMValueDict* map, const char**& keys, const char**&
auto key = it->first;
auto value = std::static_pointer_cast<const alt::IMValueString>(it->second)->Value();

auto keySize = strlen(key);
auto keyStr = key.c_str();
auto keySize = key.size();
auto allocKey = new char[keySize + 1];
for (auto j = 0; j < keySize; j++) allocKey[j] = key[j];
for (auto j = 0; j < keySize; j++) allocKey[j] = keyStr[j];
allocKey[keySize] = '\0';
keys[i] = allocKey;

Expand Down
Loading

0 comments on commit b5148cc

Please sign in to comment.