Skip to content

Commit

Permalink
fix: Fix actual code for data store match
Browse files Browse the repository at this point in the history
  • Loading branch information
Quenty committed Sep 7, 2023
1 parent 8647a24 commit ed39424
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/datastore/src/Shared/Utility/DataStoreStringUtils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ function DataStoreStringUtils.isValidUTF8(str)
return false, "Not a string"
end

if not utf8.len(str) then
return false, "Invalid string"
end

-- https://gist.github.com/TheGreatSageEqualToHeaven/e0e1dc2698307c93f6013b9825705899#patch-1
if string.match(input, "[^\0-\127]") then
if string.match(str, "[^\0-\127]") then
return false, "Invalid string"
end

Expand Down

0 comments on commit ed39424

Please sign in to comment.