Commit a4839ff0 authored by VanillaSalt's avatar VanillaSalt

fix

parent 75c8cf25
...@@ -4410,9 +4410,9 @@ int32 field::sort_chain(uint16 step, uint8 tp) { ...@@ -4410,9 +4410,9 @@ int32 field::sort_chain(uint16 step, uint8 tp) {
return TRUE; return TRUE;
chain_list::iterator clit; chain_list::iterator clit;
int32 i = 0, count; int32 i = 0, count;
chain_array ch(8);
if(tp) { if(tp) {
count = core.tpchain.size(); count = core.tpchain.size();
chain_array ch(count);
for(i = 0, clit = core.tpchain.begin(); i < count; ++clit, ++i) for(i = 0, clit = core.tpchain.begin(); i < count; ++clit, ++i)
ch[returns.bvalue[i]] = *clit; ch[returns.bvalue[i]] = *clit;
core.tpchain.clear(); core.tpchain.clear();
...@@ -4420,6 +4420,7 @@ int32 field::sort_chain(uint16 step, uint8 tp) { ...@@ -4420,6 +4420,7 @@ int32 field::sort_chain(uint16 step, uint8 tp) {
core.tpchain.push_back(ch[i]); core.tpchain.push_back(ch[i]);
} else { } else {
count = core.ntpchain.size(); count = core.ntpchain.size();
chain_array ch(count);
for(i = 0, clit = core.ntpchain.begin(); i < count; ++clit, ++i) for(i = 0, clit = core.ntpchain.begin(); i < count; ++clit, ++i)
ch[returns.bvalue[i]] = *clit; ch[returns.bvalue[i]] = *clit;
core.ntpchain.clear(); core.ntpchain.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment