mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 05:52:46 +00:00 
			
		
		
		
	LibBareMetal: Don't try to print characters from a null pointer
This commit is contained in:
		
							parent
							
								
									783c99516a
								
							
						
					
					
						commit
						dfa69b82b4
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -155,6 +155,8 @@ static void debugger_putch(char*&, char ch) | |||
| 
 | ||||
| extern "C" int dbgputstr(const char* characters, int length) | ||||
| { | ||||
|     if (!characters) | ||||
|         return 0; | ||||
|     for (int i = 0; i < length; ++i) | ||||
|         debugger_out(characters[i]); | ||||
|     return 0; | ||||
|  | @ -162,6 +164,8 @@ extern "C" int dbgputstr(const char* characters, int length) | |||
| 
 | ||||
| extern "C" int kernelputstr(const char* characters, int length) | ||||
| { | ||||
|     if (!characters) | ||||
|         return 0; | ||||
|     for (int i = 0; i < length; ++i) | ||||
|         console_out(characters[i]); | ||||
|     return 0; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling