Parser: Do not reset attributes when tag has more than 16 attributes [#579]

pull/620/head
gnosygnu 5 years ago
parent 742e61b718
commit fdd05c99a9

@ -25,6 +25,15 @@ public class Int_ary_ {//RF:DATE:2017-10-09
trg[i] = src[i];
}
public static int[] Mid(int[] src, int bgn, int end) {
int len = end - bgn + 1;
int[] rv = new int[len];
for (int i = 0; i < len; i++) {
rv[i] = src[i + bgn];
}
return rv;
}
public static String To_str(String spr, int... ary) {
Bry_bfr bfr = Bry_bfr_.New();
int len = ary.length;

@ -41,7 +41,7 @@ public class Mwh_atr_mgr {
if (data_idx == data_max) {
int new_data_max = data_max == 0 ? Idx__mult : data_max * 2;
int[] new_data_ary = new int[new_data_max];
Int_ary_.Copy_to(data_ary, data_max, data_ary);
Int_ary_.Copy_to(data_ary, data_max, new_data_ary);
this.data_ary = new_data_ary;
int text_max = text_ary.length;

@ -23,10 +23,15 @@ public class Mwh_atr_mgr_tst {
// key=val key=v<nowiki/>al
fxt.Test_atr_utl_make(Mwh_atr_itm_.Qte_tid__none, Mwh_atr_itm_.Mask__valid__y, Mwh_atr_itm_.Mask__repeated__y, Mwh_atr_itm_.Mask__key_exists__y, Mwh_atr_itm_.Mask__val_made__y, 120);
}
@Test public void Resize() {
@Test public void Resize() {// ISSUE#:
Mwh_atr_mgr atr_mgr = new Mwh_atr_mgr(1);
int[] expd = new int[] {2, 3, 4, 5};
atr_mgr.Add(0, 1, true, true, true, 2, 3, 4, 5, Bry_.Empty, 0, 0, 0, 0, Bry_.Empty);
Gftest.Eq__ary(expd, Int_ary_.Mid(atr_mgr.Data_ary(), 3, 6));
atr_mgr.Add(1, 0, true, true, true, 0, 0, 0, 0, Bry_.Empty, 0, 0, 0, 0, Bry_.Empty);
Gftest.Eq__ary(expd, Int_ary_.Mid(atr_mgr.Data_ary(), 3, 6));
}
}
class Mwh_atr_mgr_fxt {

Loading…
Cancel
Save