projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reindent
[yaz-moved-to-github.git]
/
src
/
snprintf.c
diff --git
a/src/snprintf.c
b/src/snprintf.c
index
0221f97
..
2aedb83
100644
(file)
--- a/
src/snprintf.c
+++ b/
src/snprintf.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2008 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
/**
* See the file LICENSE for details.
*/
/**
@@
-17,7
+17,8
@@
void yaz_vsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
vsnprintf(buf, size, fmt, ap);
#else
#ifdef WIN32
vsnprintf(buf, size, fmt, ap);
#else
#ifdef WIN32
- _vsnprintf(buf, size, fmt, ap);
+ _vsnprintf(buf, size-1, fmt, ap);
+ buf[size-1] = '\0';
#else
vsprintf(buf, fmt, ap);
#endif
#else
vsprintf(buf, fmt, ap);
#endif
@@
-35,6
+36,7
@@
void yaz_snprintf(char *buf, size_t size, const char *fmt, ...)
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab