/*
* This file is part of DisOrder.
- * Copyright (C) 2004, 2005, 2006 Richard Kettlewell
+ * Copyright (C) 2004-2008 Richard Kettlewell
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
int ch;
size_t n = 0;
- if(byte_vsnprintf(t, sizeof t, fmt, ap) < 0)
- strcpy(t, "[byte_vsnprintf failed]");
+ if(byte_vsnprintf(t, sizeof t, fmt, ap) < 0) {
+ strcpy(t, "[byte_vsnprintf failed: ");
+ strncat(t, fmt, sizeof t - strlen(t) - 1);
+ }
p = t;
while((ch = (unsigned char)*p++)) {
if(ch >= ' ' && ch <= 126) {