summaryrefslogtreecommitdiffstats
path: root/runtime/vsprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/vsprintf.c')
-rw-r--r--runtime/vsprintf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c
index 0bf625a5..4ffcf72e 100644
--- a/runtime/vsprintf.c
+++ b/runtime/vsprintf.c
@@ -248,6 +248,11 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
++str;
}
}
+#ifdef __ia64__
+ if ((str + precision - 1) <= end)
+ memcpy(str, &num, precision); //to prevent unaligned access
+ str += precision;
+#else
switch(precision) {
case 1:
if(str <= end)
@@ -271,6 +276,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
str+=8;
break;
}
+#endif
while (len < field_width--) {
if (str <= end)
*str = '\0';