Fix parser
This commit is contained in:
parent
2e81e5cbca
commit
06d93df1bb
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue