diff options
Diffstat (limited to 'src/WixToolset.Core.Burn/Bundles/BurnCommon.cs')
-rw-r--r-- | src/WixToolset.Core.Burn/Bundles/BurnCommon.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/WixToolset.Core.Burn/Bundles/BurnCommon.cs b/src/WixToolset.Core.Burn/Bundles/BurnCommon.cs index 5cff0b5a..01c9f9ca 100644 --- a/src/WixToolset.Core.Burn/Bundles/BurnCommon.cs +++ b/src/WixToolset.Core.Burn/Bundles/BurnCommon.cs | |||
@@ -354,7 +354,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
354 | /// <param name="bytes">Array from which to read.</param> | 354 | /// <param name="bytes">Array from which to read.</param> |
355 | /// <param name="offset">Beginning offset from which to read.</param> | 355 | /// <param name="offset">Beginning offset from which to read.</param> |
356 | /// <returns>value at offset</returns> | 356 | /// <returns>value at offset</returns> |
357 | private static UInt16 ReadUInt16(byte[] bytes, UInt32 offset) | 357 | internal static UInt16 ReadUInt16(byte[] bytes, UInt32 offset) |
358 | { | 358 | { |
359 | Debug.Assert(offset + 2 <= bytes.Length); | 359 | Debug.Assert(offset + 2 <= bytes.Length); |
360 | return (UInt16)(bytes[offset] + (bytes[offset + 1] << 8)); | 360 | return (UInt16)(bytes[offset] + (bytes[offset + 1] << 8)); |
@@ -366,10 +366,10 @@ namespace WixToolset.Core.Burn.Bundles | |||
366 | /// <param name="bytes">Array from which to read.</param> | 366 | /// <param name="bytes">Array from which to read.</param> |
367 | /// <param name="offset">Beginning offset from which to read.</param> | 367 | /// <param name="offset">Beginning offset from which to read.</param> |
368 | /// <returns>value at offset</returns> | 368 | /// <returns>value at offset</returns> |
369 | private static UInt32 ReadUInt32(byte[] bytes, UInt32 offset) | 369 | internal static UInt32 ReadUInt32(byte[] bytes, UInt32 offset) |
370 | { | 370 | { |
371 | Debug.Assert(offset + 4 <= bytes.Length); | 371 | Debug.Assert(offset + 4 <= bytes.Length); |
372 | return (UInt32)(bytes[offset] + (bytes[offset + 1] << 8) + (bytes[offset + 2] << 16) + (bytes[offset + 3] << 24)); | 372 | return BurnCommon.ReadUInt16(bytes, offset) + ((UInt32)BurnCommon.ReadUInt16(bytes, offset + 2) << 16); |
373 | } | 373 | } |
374 | 374 | ||
375 | /// <summary> | 375 | /// <summary> |
@@ -378,10 +378,10 @@ namespace WixToolset.Core.Burn.Bundles | |||
378 | /// <param name="bytes">Array from which to read.</param> | 378 | /// <param name="bytes">Array from which to read.</param> |
379 | /// <param name="offset">Beginning offset from which to read.</param> | 379 | /// <param name="offset">Beginning offset from which to read.</param> |
380 | /// <returns>value at offset</returns> | 380 | /// <returns>value at offset</returns> |
381 | private static UInt64 ReadUInt64(byte[] bytes, UInt32 offset) | 381 | internal static UInt64 ReadUInt64(byte[] bytes, UInt32 offset) |
382 | { | 382 | { |
383 | Debug.Assert(offset + 8 <= bytes.Length); | 383 | Debug.Assert(offset + 8 <= bytes.Length); |
384 | return BurnCommon.ReadUInt32(bytes, offset) + ((UInt64)(BurnCommon.ReadUInt32(bytes, offset + 4)) << 32); | 384 | return BurnCommon.ReadUInt32(bytes, offset) + ((UInt64)BurnCommon.ReadUInt32(bytes, offset + 4) << 32); |
385 | } | 385 | } |
386 | } | 386 | } |
387 | } | 387 | } |