safely print errors by explicitly specifying a format string
This commit is contained in:
		
							parent
							
								
									adfbc5bb64
								
							
						
					
					
						commit
						2572a05e8b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -94,7 +94,7 @@ void raiseRbExc(const Exception &exc)
 | 
				
			||||||
	RbData *data = getRbData();
 | 
						RbData *data = getRbData();
 | 
				
			||||||
	VALUE excClass = data->exc[excToRbExc[exc.type]];
 | 
						VALUE excClass = data->exc[excToRbExc[exc.type]];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	rb_raise(excClass, exc.msg.c_str());
 | 
						rb_raise(excClass, "%s", exc.msg.c_str());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					int
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue