This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Commit a23ce6f
committed
*: Prevented unit's Contents modification
Resolves #1514
The problem was caused by the [code optimization](#1376). Before that each unit was stored in its own variable. Then this code was optimized and units became stored in hash map (`getAllUnitsHashMap`). Each hash was assigned to the unit's pointer. And when template unit was checked by `requirements()` function, its content was modified by `values[i] = unitPrintf(v, *uni)` code. Once templated unit was modified, all related units (which have same hash) were modified too, because they are related to one pointer.1 parent bbea486 commit a23ce6f
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | | - | |
| 180 | + | |
180 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
181 | 185 | | |
182 | | - | |
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| |||
0 commit comments