Fixed a bug where your chatlog would completely erase if you had a limit of 0.
A limit of zero otherwise means infinite, so no log limit.
This commit is contained in:
		
							parent
							
								
									1dcdb0f5d8
								
							
						
					
					
						commit
						941a32d99c
					
				@ -1309,7 +1309,7 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
 | 
			
		||||
  chatlogpiece* temp = new chatlogpiece(ao_app->get_showname(char_list.at(f_char_id).name), f_showname, ": " + m_chatmessage[MESSAGE], false);
 | 
			
		||||
  ic_chatlog_history.append(*temp);
 | 
			
		||||
 | 
			
		||||
  while(ic_chatlog_history.size() > log_maximum_blocks)
 | 
			
		||||
  while(ic_chatlog_history.size() > log_maximum_blocks && log_maximum_blocks > 0)
 | 
			
		||||
  {
 | 
			
		||||
    ic_chatlog_history.removeFirst();
 | 
			
		||||
  }
 | 
			
		||||
@ -2611,7 +2611,7 @@ void Courtroom::handle_song(QStringList *p_contents)
 | 
			
		||||
      chatlogpiece* temp = new chatlogpiece(str_char, str_show, f_song, true);
 | 
			
		||||
      ic_chatlog_history.append(*temp);
 | 
			
		||||
 | 
			
		||||
      while(ic_chatlog_history.size() > log_maximum_blocks)
 | 
			
		||||
      while(ic_chatlog_history.size() > log_maximum_blocks && log_maximum_blocks > 0)
 | 
			
		||||
      {
 | 
			
		||||
        ic_chatlog_history.removeFirst();
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user