diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..efd480a --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,22 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@pythnetwork/pyth-sdk-solidity': + specifier: ^4.0.0 + version: 4.0.0 + +packages: + + '@pythnetwork/pyth-sdk-solidity@4.0.0': + resolution: {integrity: sha512-Cy2MvSN1Oh5YpIYmZd2In6/gfXbGjnpazmXKioTuq07Drp4Rl2XHcvtqHdgilplCl32IG4pU+XoRafpexID08A==} + +snapshots: + + '@pythnetwork/pyth-sdk-solidity@4.0.0': {} diff --git a/src/utils/StringUtils.sol b/src/utils/StringUtils.sol index 3364d78..5b10dd7 100644 --- a/src/utils/StringUtils.sol +++ b/src/utils/StringUtils.sol @@ -135,6 +135,15 @@ library StringUtils { } } + // Checks if the character at index is a Tag Indicator (used in special flag sequences) + if ( + b == 0xF3 && index + 2 < strBytes.length && + strBytes[index + 1] == 0xA0 && + strBytes[index + 2] >= 0x80 && strBytes[index + 2] <= 0x9F + ) { + return true; + } + return false; }