diff options
Diffstat (limited to 'source/core/slang-io.cpp')
| -rw-r--r-- | source/core/slang-io.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/core/slang-io.cpp b/source/core/slang-io.cpp index 8a2243b15..4ef5ecc2d 100644 --- a/source/core/slang-io.cpp +++ b/source/core/slang-io.cpp @@ -126,7 +126,8 @@ namespace Slang List<char> buffer; auto copySize = builder.getLength(); buffer.setCount(copySize + 1); - SLANG_ASSERT(copySize < PTRDIFF_MAX); // Shhh gcc, it's ok, we're not copying 9000 Petabytes + // Satisfy GCC + SLANG_ASSUME(copySize < PTRDIFF_MAX && copySize > 0); ::memcpy(buffer.getBuffer(), builder.getBuffer(), copySize); buffer[copySize] = 0; |
