about summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/strftime.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/time/strftime.c b/time/strftime.c
index f0be6b646d..ed029605d9 100644
--- a/time/strftime.c
+++ b/time/strftime.c
@@ -542,7 +542,13 @@ my_strftime (s, maxsize, format, tp)
 		if (bytes == 0)
 		  break;
 
-		if (bytes == (size_t) -2 || bytes == (size_t) -1)
+		if (bytes == (size_t) -2)
+		  {
+		    len += strlen (f + len);
+		    break;
+		  }
+		
+		if (bytes == (size_t) -1)
 		  {
 		    len++;
 		    break;
@@ -553,6 +559,7 @@ my_strftime (s, maxsize, format, tp)
 	    while (! mbsinit (&mbstate));
 
 	    cpy (len, f);
+	    f += len - 1;
 	    continue;
 	  }
 	}