Fix for amb1596 ; csx was allocating a buffer to small for csstats.amxx's stats[] array
This commit is contained in:
		@@ -131,7 +131,7 @@ void RankSystem::clear(){
 | 
				
			|||||||
bool RankSystem::loadCalc(const char* filename, char* error)
 | 
					bool RankSystem::loadCalc(const char* filename, char* error)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if ((MF_LoadAmxScript(&calc.amx,&calc.code,filename,error,0)!=AMX_ERR_NONE)||
 | 
						if ((MF_LoadAmxScript(&calc.amx,&calc.code,filename,error,0)!=AMX_ERR_NONE)||
 | 
				
			||||||
		(MF_AmxAllot(&calc.amx, 8 , &calc.amxAddr1, &calc.physAddr1)!=AMX_ERR_NONE)||
 | 
							(MF_AmxAllot(&calc.amx, 11 , &calc.amxAddr1, &calc.physAddr1)!=AMX_ERR_NONE)||
 | 
				
			||||||
		(MF_AmxAllot(&calc.amx, 8 , &calc.amxAddr2, &calc.physAddr2)!=AMX_ERR_NONE)||
 | 
							(MF_AmxAllot(&calc.amx, 8 , &calc.amxAddr2, &calc.physAddr2)!=AMX_ERR_NONE)||
 | 
				
			||||||
		(MF_AmxFindPublic(&calc.amx,"get_score",&calc.func)!=AMX_ERR_NONE)){
 | 
							(MF_AmxFindPublic(&calc.amx,"get_score",&calc.func)!=AMX_ERR_NONE)){
 | 
				
			||||||
		LOG_CONSOLE( PLID, "Couldn't load plugin (file \"%s\")",filename);
 | 
							LOG_CONSOLE( PLID, "Couldn't load plugin (file \"%s\")",filename);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,9 +46,13 @@
 | 
				
			|||||||
* 4 - shots
 | 
					* 4 - shots
 | 
				
			||||||
* 5 - hits
 | 
					* 5 - hits
 | 
				
			||||||
* 6 - damage
 | 
					* 6 - damage
 | 
				
			||||||
 | 
					* 7 - defusions
 | 
				
			||||||
 | 
					* 8 - defused
 | 
				
			||||||
 | 
					* 9 - plants
 | 
				
			||||||
 | 
					* 10 - explosions
 | 
				
			||||||
*
 | 
					*
 | 
				
			||||||
* Returning cellmin as value in get_score function
 | 
					* Returning cellmin as value in get_score function
 | 
				
			||||||
* makes that rank won't be saved. */
 | 
					* makes that rank won't be saved. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public get_score(stats[8], body[8])
 | 
					public get_score(stats[11], body[8])
 | 
				
			||||||
	return stats[0] - stats[1] - stats[3]	// kills - deaths - teamkills
 | 
						return stats[0] - stats[1] - stats[3]	// kills - deaths - teamkills
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user