diff --git a/c1-m4-activity/read.go b/c1-m4-activity/read.go index ced4552..dadb5ca 100644 --- a/c1-m4-activity/read.go +++ b/c1-m4-activity/read.go @@ -59,7 +59,8 @@ func main() { text := scanner.Text() for pos, char := range []byte(text) { if char == ' ' { - names = append(names, Name{string(text[:pos]), string(text[pos+1:])}) + tempName := Name{string(text[:pos]), string(text[pos+1:])} + names = append(names, tempName) } } }