mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-18 19:45:41 -04:00
[libromdata] ISO, IsoPartition: Simplify the Joliet escape sequence parser a bit.
This commit is contained in:
parent
6e7d57282f
commit
4342ce8a1b
@ -340,25 +340,24 @@ void ISOPrivate::checkVolumeDescriptors(void)
|
|||||||
|
|
||||||
// Check if this is a valid UCS-2 level seqeunce.
|
// Check if this is a valid UCS-2 level seqeunce.
|
||||||
// NOTE: Using the highest level specified.
|
// NOTE: Using the highest level specified.
|
||||||
|
JolietSVDType newType = JolietSVDType::None;
|
||||||
switch (p[2]) {
|
switch (p[2]) {
|
||||||
case '@':
|
case '@':
|
||||||
if (jolietSVDType < JolietSVDType::UCS2_Level1) {
|
newType = JolietSVDType::UCS2_Level1;
|
||||||
jolietSVDType = JolietSVDType::UCS2_Level1;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
if (jolietSVDType < JolietSVDType::UCS2_Level2) {
|
newType = JolietSVDType::UCS2_Level2;
|
||||||
jolietSVDType = JolietSVDType::UCS2_Level2;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'E':
|
case 'E':
|
||||||
if (jolietSVDType < JolietSVDType::UCS2_Level3) {
|
newType = JolietSVDType::UCS2_Level3;
|
||||||
jolietSVDType = JolietSVDType::UCS2_Level3;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (jolietSVDType < newType) {
|
||||||
|
jolietSVDType = newType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -225,25 +225,24 @@ IsoPartitionPrivate::IsoPartitionPrivate(IsoPartition *q,
|
|||||||
|
|
||||||
// Check if this is a valid UCS-2 level seqeunce.
|
// Check if this is a valid UCS-2 level seqeunce.
|
||||||
// NOTE: Using the highest level specified.
|
// NOTE: Using the highest level specified.
|
||||||
|
JolietSVDType newType = JolietSVDType::None;
|
||||||
switch (p[2]) {
|
switch (p[2]) {
|
||||||
case '@':
|
case '@':
|
||||||
if (jolietSVDType < JolietSVDType::UCS2_Level1) {
|
newType = JolietSVDType::UCS2_Level1;
|
||||||
jolietSVDType = JolietSVDType::UCS2_Level1;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
if (jolietSVDType < JolietSVDType::UCS2_Level2) {
|
newType = JolietSVDType::UCS2_Level2;
|
||||||
jolietSVDType = JolietSVDType::UCS2_Level2;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'E':
|
case 'E':
|
||||||
if (jolietSVDType < JolietSVDType::UCS2_Level3) {
|
newType = JolietSVDType::UCS2_Level3;
|
||||||
jolietSVDType = JolietSVDType::UCS2_Level3;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (jolietSVDType < newType) {
|
||||||
|
jolietSVDType = newType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user