aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zencore/include/zencore/memory.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/zencore/include/zencore/memory.h b/src/zencore/include/zencore/memory.h
index a1f48555e..6965b76b1 100644
--- a/src/zencore/include/zencore/memory.h
+++ b/src/zencore/include/zencore/memory.h
@@ -141,7 +141,10 @@ struct MutableMemoryView
inline void MidInline(uint64_t InOffset, uint64_t InSize = ~uint64_t(0))
{
RightChopInline(InOffset);
- LeftInline(InSize);
+ if (InSize != ~uint64_t(0))
+ {
+ LeftInline(InSize);
+ }
}
/** Returns the middle part of the view by taking up to the given number of bytes from the given position. */
@@ -271,7 +274,10 @@ struct MemoryView
inline void MidInline(uint64_t InOffset, uint64_t InSize = ~uint64_t(0))
{
RightChopInline(InOffset);
- LeftInline(InSize);
+ if (InSize != ~uint64_t(0))
+ {
+ LeftInline(InSize);
+ }
}
/** Returns the middle part of the view by taking up to the given number of bytes from the given position. */