Changeset: 084431fd0be2 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=084431fd0be2 Modified Files: sql/src/backends/monet5/merovingian/ChangeLog.Oct2010 sql/src/backends/monet5/merovingian/utils.c Branch: Oct2010 Log Message:
Off-by-one error when abbreviating strings. diffs (25 lines): diff -r 6fc126a6fc06 -r 084431fd0be2 sql/src/backends/monet5/merovingian/ChangeLog.Oct2010 --- a/sql/src/backends/monet5/merovingian/ChangeLog.Oct2010 Tue Nov 16 16:15:24 2010 +0100 +++ b/sql/src/backends/monet5/merovingian/ChangeLog.Oct2010 Wed Nov 17 14:33:52 2010 +0100 @@ -1,3 +1,7 @@ # ChangeLog file for sql/src/backends/monet5/merovingian # This file is updated with mchangelog +* Wed Nov 17 2010 Sjoerd Mullender <sjo...@acm.org> +- Fixed off-by-one error when abbreviating long database names in the + monetdb status command. + diff -r 6fc126a6fc06 -r 084431fd0be2 sql/src/backends/monet5/merovingian/utils.c --- a/sql/src/backends/monet5/merovingian/utils.c Tue Nov 16 16:15:24 2010 +0100 +++ b/sql/src/backends/monet5/merovingian/utils.c Wed Nov 17 14:33:52 2010 +0100 @@ -266,8 +266,8 @@ if ((len = strlen(in)) > width) { /* position abbreviation dots in the middle (Mac style, iso - * Windos style) */ - memcpy(ret, in, (width / 2) - 3); + * Windows style) */ + memcpy(ret, in, (width / 2) - 2); memcpy(ret + (width / 2) - 2, "...", 3); off = len - (width - ((width / 2) - 2) - 3); memcpy(ret + (width / 2) + 1, in + off, (len - off) + 1); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list