Commit d532986
Fix wrong pointer in range loop (kubernetes#1198) (kubernetes#1209)
range copies the value as a local variable in the loop.
Getting the pointer from it makes all the elements in the map point to
the last value that the range variable copied.
Change to get value with index from array directly.
Co-authored-by: Phillip <32705812+phiphi282@users.noreply.github.com>1 parent cbee1e1 commit d532986
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
| 1103 | + | |
1104 | 1104 | | |
1105 | | - | |
| 1105 | + | |
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
| |||
0 commit comments