- while (*tempBuffer != '|') {
- growingBuffer.write(tempBuffer++, 1);
+ pipeIndex = strchr(tempBuffer, '|');
+ if (!pipeIndex) {
+ GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] expected pipe character (‘|’) but found none.\n", __FILE__, __LINE__);
+ return NULL;