shithub: riscv

Download patch

ref: 6886164e34f8da60069ae1e13ce6032f9aac1678
parent: 7420dc6adab03f28020243d71a3372cda15cacbc
author: ben <ben@rana>
date: Thu Apr 28 07:20:38 EDT 2016

fix printing a char from a string that starts with a rune

--- a/sys/src/cmd/awk/run.c
+++ b/sys/src/cmd/awk/run.c
@@ -960,8 +960,10 @@
 					*p++ = '\0';
 					*p = '\0';
 				}
-			} else
-				sprint(p, fmt, getsval(x)[0]);
+			} else {
+				*p++ = getsval(x)[0];
+				*p = 0;
+			}
 			break;
 		}
 		if (istemp(x))