Skip to content

Commit

Permalink
using an amtl string impl
Browse files Browse the repository at this point in the history
  • Loading branch information
rejchev committed Jul 7, 2023
1 parent 400be8e commit a52e432
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/json.cpp
@@ -1,4 +1,4 @@
#include <cstring>
#include <amtl/am-string.h>

#include "json.h"
#include "json_utils.h"
Expand Down Expand Up @@ -337,8 +337,8 @@ JsonError_t Json::convertNativeErrorStruct(const json_error_t *error) {
error->position
};

strcpy_s(buffer.source, strlen(error->source) + 1, error->source);
strcpy_s(buffer.source, strlen(error->text), error->text);
ke::SafeStrcpyN(buffer.source, PLATFORM_MAX_PATH, error->source, strlen(error->source) + 1);
ke::SafeStrcpyN(buffer.text, PLATFORM_MAX_PATH, error->text, strlen(error->text));

return buffer;
}
Expand Down

0 comments on commit a52e432

Please sign in to comment.