Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
sammycage committed Jun 18, 2024
1 parent b6bfd4f commit 4a33e8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/plutobook.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ class PLUTOBOOK_API ResourceData {
* @param closure
* @return
*/
static ResourceData createWithoutCopy(const char* content, size_t contentLength, const std::string& mimeType, const std::string& textEncoding, plutobook_resource_destroy_callback_t destroyCallback, void* closure);
static ResourceData createWithoutCopy(const char* content, size_t contentLength, const std::string& mimeType, const std::string& textEncoding,
plutobook_resource_destroy_callback_t destroyCallback, void* closure);

/**
* @brief ResourceData
Expand Down
2 changes: 1 addition & 1 deletion source/resource/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ static ResourceData loadDataUrl(std::string_view input)
}

std::string_view formatType;
input.remove_prefix(headerEnd + 1);
if(mediaTypeEnd < header.length()) {
formatType = header.substr(mediaTypeEnd + 1);
stripLeadingAndTrailingSpaces(formatType);
}

auto content = ByteArrayCreate();
input.remove_prefix(headerEnd + 1);
if(!equals(formatType, "base64", false)) {
content->reserve(input.length());
content->assign(input.begin(), input.end());
Expand Down

0 comments on commit 4a33e8e

Please sign in to comment.