This repository was archived by the owner on Sep 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616#pragma newdecls required
1717
18- #define PLUGIN_VERSION " 0.1.1 "
18+ #define PLUGIN_VERSION " 0.1.2 "
1919public Plugin myinfo = {
2020 name = " Level KeyValues" ,
2121 author = " nosoop" ,
@@ -99,8 +99,6 @@ static ArrayList ParseEntityList(const char mapEntities[2097152]) {
9999
100100 ArrayList mapEntityList = new ArrayList ();
101101
102- int nKeys ;
103-
104102 char key [256 ], value [256 ];
105103
106104 StringMultiMap currentEntityMap ;
@@ -111,19 +109,18 @@ static ArrayList ParseEntityList(const char mapEntities[2097152]) {
111109 switch (lineBuffer [0 ]) {
112110 case ' {' : {
113111 currentEntityMap = new StringMultiMap ();
114- nKeys ++ ;
115112 }
116113 case ' }' : {
117114 if (ForwardOnEntityKeysParsed (currentEntityMap ) != Plugin_Stop ) {
118115 mapEntityList .Push (currentEntityMap );
116+ currentEntityMap = null ; // don't hold a reference that might be pushed later
119117 } else {
120118 delete currentEntityMap ;
121119 }
122120
123121 // next open bracket starts on same line
124122 if (lineBuffer [1 ] == ' {' ) {
125123 currentEntityMap = new StringMultiMap ();
126- nKeys ++ ;
127124 }
128125 }
129126 default : {
You can’t perform that action at this time.
0 commit comments