Skip to content

Commit 9fc5799

Browse files
committed
Check for null or empty layerbreak arrays
1 parent 61f90a6 commit 9fc5799

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELIST.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### WIP (xxxx-xx-xx)
2+
3+
- Check for null or empty layerbreak arrays
4+
15
### 3.6.0 (2025-11-28)
26

37
- Add BCA to list of files to select in Check UI

MPF.Processors/ProcessingTool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ public static bool GetLayerbreaks(DiscInformation? di, out long? layerbreak1, ou
253253
// Wrap big-endian reading
254254
static int ReadFromArrayBigEndian(byte[]? bytes, int offset)
255255
{
256-
if (bytes == null)
256+
if (bytes.IsNullOrEmpty())
257257
return default;
258258

259-
return bytes.ReadInt32BigEndian(ref offset);
259+
return bytes!.ReadInt32BigEndian(ref offset);
260260
}
261261

262262
// Layerbreak 1 (2+ layers)

0 commit comments

Comments
 (0)