aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/str.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/str.go')
-rw-r--r--src/syscall/str.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/syscall/str.go b/src/syscall/str.go
index 0fce842e8c..2ddf04b227 100644
--- a/src/syscall/str.go
+++ b/src/syscall/str.go
@@ -6,8 +6,12 @@ package syscall
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
if val < 0 {
- return "-" + itoa(-val)
+ return "-" + uitoa(uint(-val))
}
+ return uitoa(uint(val))
+}
+
+func uitoa(val uint) string {
var buf [32]byte // big enough for int64
i := len(buf) - 1
for val >= 10 {