Skip to content
Unverified Commit c512c686 authored by Steven Perron's avatar Steven Perron Committed by GitHub
Browse files

Avoid GCC8 warning in text_handler.cpp. (#2197)

In the function `AssemblyContext::binaryEncodeString`, we want to copy
a nul terminated string to an instruction.  When coping the string, we
did not copy the nul at the end of the source.  It was added by setting
the entire last word to 0, which is mandated by the spir-v spec.  This
is not a bug, but it does trigger a warning in GCC8 when doing a release
build.

To avoid the warning, we will copy the nul character at the end of the
string too.

Fixes #1541.
parent 2af6ffae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment