about summary refs log tree commit diff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/ldbl-128/printf_fphex.c10
-rw-r--r--sysdeps/ieee754/ldbl-96/printf_fphex.c10
2 files changed, 12 insertions, 8 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))		      \
diff --git a/sysdeps/ieee754/ldbl-96/printf_fphex.c b/sysdeps/ieee754/ldbl-96/printf_fphex.c
index 36d6014cea..9be0132e20 100644
--- a/sysdeps/ieee754/ldbl-96/printf_fphex.c
+++ b/sysdeps/ieee754/ldbl-96/printf_fphex.c
@@ -38,14 +38,16 @@ do {									      \
 	{								      \
 	  numstr = _itoa_word (num, numbuf + sizeof numbuf, 16,		      \
 			       info->spec == 'A');			      \
-	  wnumstr = _itowa_word (num, wnumbuf + sizeof wnumbuf, 16,	      \
-				 info->spec == 'A');			      \
+	  wnumstr = _itowa_word (num,					      \
+				 wnumbuf + sizeof (wnumbuf) / sizeof (wchar_t),\
+				 16, info->spec == 'A');		      \
 	}								      \
       else								      \
 	{								      \
 	  numstr = _itoa (num, numbuf + sizeof numbuf, 16, info->spec == 'A');\
-	  wnumstr = _itowa (num, wnumbuf + sizeof wnumbuf, 16,		      \
-			    info->spec == 'A');				      \
+	  wnumstr = _itowa (num,					      \
+			    wnumbuf + sizeof (wnumbuf) / sizeof (wchar_t),    \
+			    16, info->spec == 'A');			      \
 	}								      \
 									      \
       /* Fill with zeroes.  */						      \