This commit is contained in:
Ayke van Laethem
2018-08-17 23:21:47 +02:00
parent 574c7ec047
commit 62c4c5e90b
19 changed files with 28 additions and 45 deletions
+2 -3
View File
@@ -1,4 +1,3 @@
package runtime
import (
@@ -96,8 +95,8 @@ func printitf(msg interface{}) {
func printptr(ptr uintptr) {
putchar('0')
putchar('x')
for i := 0; i < int(unsafe.Sizeof(ptr)) * 2; i++ {
nibble := byte(ptr >> (unsafe.Sizeof(ptr) * 8 - 4))
for i := 0; i < int(unsafe.Sizeof(ptr))*2; i++ {
nibble := byte(ptr >> (unsafe.Sizeof(ptr)*8 - 4))
if nibble < 10 {
putchar(nibble + '0')
} else {