Open
Description
Here's a case that doesn't fire inspection but should:
Select Case True
Case Record(0) = &HEB And Record(1) = &HBB And Record(2) = &HBF
'UTF8
Case Record(0) = &HFE And Record(1) = &HFF
'UTF-16 BE
Case Record(0) = &HFF And Record(1) = &HFE
'UTF-16 LE
Case Record(0) = &H0 And Record(1) = &H0 And Record(2) = &HFE And Record(3) = &HFF
'UTF-32 BE
Case Record(0) = &HFF And Record(1) = &HFE And Record(2) = &H0 And Record(3) = &H0
'UTF-32 LE
Case False
End Select
The last 2 clauses are technically unreachable because the more looser check will be evaluated before the more stricter ones. I added Caes False
to see if I would get a inspection result; I didn't.
The correct ordering should be:
Select Case True
Case Record(0) = &HEB And Record(1) = &HBB And Record(2) = &HBF
'UTF-8
Case Record(0) = &H0 And Record(1) = &H0 And Record(2) = &HFE And Record(3) = &HFF
'UTF-32 BE
Case Record(0) = &HFF And Record(1) = &HFE And Record(2) = &H0 And Record(3) = &H0
'UTF-32 LE
Case Record(0) = &HFE And Record(1) = &HFF
'UTF-16 BE
Case Record(0) = &HFF And Record(1) = &HFE
'UTF-16 LE
End Select
Metadata
Metadata
Assignees
Labels
Identifies work items for known bugsInvolves more challenging problems and/or developing within and revising the internals APIMarks a bug as an edge case that would be nice to fix, but that likely doesn't affect normal use.Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky