Avoid zstr in write_debug when no *debug* buffer can be created

This commit is contained in:
Maxime Coste 2015-04-03 13:14:59 +01:00
parent 7176685690
commit 04a922fe1a

View File

@ -13,7 +13,8 @@ void write_debug(StringView str)
{
if (not BufferManager::has_instance())
{
fprintf(stderr, "%s\n", (const char*)str.zstr());
write(2, str.data(), (int)str.length());
write(2, "\n", 1);
return;
}