about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/printf_fphex.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/printf_fphex.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/printf_fphex.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sysdeps/ieee754/ldbl-128/printf_fphex.c b/sysdeps/ieee754/ldbl-128/printf_fphex.c
index 5f20dba228..5e328c7dd8 100644
--- a/sysdeps/ieee754/ldbl-128/printf_fphex.c
+++ b/sysdeps/ieee754/ldbl-128/printf_fphex.c
@@ -39,15 +39,17 @@ do {									      \
 	{								      \
 	  numstr = _itoa_word (num1, numbuf + sizeof numbuf, 16,	      \
 			       info->spec == 'A');			      \
-	  wnumstr = _itowa_word (num1, wnumbuf + sizeof wnumbuf, 16,	      \
-				 info->spec == 'A');			      \
+	  wnumstr = _itowa_word (num1,
+				 wnumbuf + sizeof (wnumbuf) / sizeof (wchar_t),\
+				 16, info->spec == 'A');		      \
 	}								      \
       else								      \
 	{								      \
 	  numstr = _itoa (num1, numbuf + sizeof numbuf, 16,		      \
 			  info->spec == 'A');				      \
-	  wnumstr = _itowa (num1, wnumbuf + sizeof wnumbuf, 16,		      \
-			    info->spec == 'A');				      \
+	  wnumstr = _itowa (num1,					      \
+			    wnumbuf + sizeof (wnumbuf) / sizeof (wchar_t),    \
+			    16, info->spec == 'A');			      \
 	}								      \
 									      \
       while (numstr > numbuf + (sizeof numbuf - 64 / 4))		      \