fixed bug amb513, comments not being removed
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401113
This commit is contained in:
		
							parent
							
								
									ee05ac6cfb
								
							
						
					
					
						commit
						91a1e2faaa
					
				@ -39,6 +39,36 @@ public ReadSimpleUsers()
 | 
				
			|||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
							/* Trim comments */
 | 
				
			||||||
 | 
							new len = strlen(line);
 | 
				
			||||||
 | 
							new bool:ignoring = false;
 | 
				
			||||||
 | 
							for (new i=0; i<len; i++)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								if (ignoring)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if (line[i] == '"')
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										ignoring = false;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									if (line[i] == '"')
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										ignoring = true;
 | 
				
			||||||
 | 
									} else if (line[i] == ';') {
 | 
				
			||||||
 | 
										line[i] = '\0';
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									} else if (line[i] == '/'
 | 
				
			||||||
 | 
												&& i != len - 1
 | 
				
			||||||
 | 
												&& line[i+1] == '/')
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										line[i] = '\0';
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							TrimString(line);
 | 
				
			||||||
 | 
							
 | 
				
			||||||
		if ((line[0] == '/' && line[1] == '/')
 | 
							if ((line[0] == '/' && line[1] == '/')
 | 
				
			||||||
			|| (line[0] == ';' || line[0] == '\0'))
 | 
								|| (line[0] == ';' || line[0] == '\0'))
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user