+2006-05-17 Borut Razem <borut.razem AT siol.net>
+
+ * support/Util/dbuf.c: fixed bug #1489008 fix dbuf_c_str(),
+ thanks Stas Sergeev
+
2006-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
* device/include/mcs51/P89c51RD2.h,
* src/z80/gen.c (aopop): fix for bug #1479882; use new, exclusive asmop
if size of operand is smaller than spill location
+2006-05-12 Borut Razem <borut.razem AT siol.net>
+
+ * *.dsw, *.dsp: changed property svn:eol-style to CRLF since they
+ have to have CR/LF line endings even if they are checked out on *nix
+ or on WIN32 in cygwin binmode
+
2006-05-12 Maarten Brock <sourceforge.brock AT dse.nl>
* doc/sdccman.lyx: documented numeric ranges, WEBDOC #1442369
/*
dbuf.c - Dynamic buffer implementation
- version 1.1.1, April 11th, 2003
+ version 1.1.2, May 17th, 2006
- Copyright (c) 2002-2003 Borut Razem
+ Copyright (c) 2002-2006 Borut Razem
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
assert(dbuf->buf != NULL);
/* only if not already null terminated */
- if (((char *)dbuf->buf)[dbuf->len] != '\0') {
+ if (dbuf->len == dbuf->alloc ||
+ ((char *)dbuf->buf)[dbuf->len] != '\0') {
dbuf_expand(dbuf, 1);
((char *)dbuf->buf)[dbuf->len] = '\0';
}