Fix parser

This commit is contained in:
zontreck 2024-05-08 13:17:00 -07:00
parent 2e81e5cbca
commit 06d93df1bb

View file

@ -48,12 +48,14 @@ class UUID {
int i = 0;
ByteLayer layer = ByteLayer();
for (i = 0; i < msbString.length; i += 2) {
int byte = int.parse(msbString.substring(i, i + 1), radix: 16);
String hex = "${msbString.substring(i, i + 2)}";
int byte = int.parse(hex, radix: 16);
layer.writeByte(byte);
}
for (i = 0; i < lsbString.length; i += 2) {
int byte = int.parse(lsbString.substring(i, i + 1), radix: 16);
String hex = "${lsbString.substring(i, i + 2)}";
int byte = int.parse(hex, radix: 16);
layer.writeByte(byte);
}