mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	Get rid of unpleasant cast, it causes SIGSEGV
Having a difficult choice between unplasant cast to get a void * into an enumeration type and "Something's wrong here" double cast I decided for the latter. At least it does not crash when the legal value of zero is passed as the argument.
This commit is contained in:
		
							parent
							
								
									86cb67de90
								
							
						
					
					
						commit
						3a246dfb9b
					
				
					 1 changed files with 2 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -672,11 +672,8 @@ DmxPrintOptions::isValidMarginSpec(PropUiItem* pui, void* data)
 | 
			
		|||
    char	*marginSpec = NULL;
 | 
			
		||||
    XtEnum	parseError;
 | 
			
		||||
    Widget	text;
 | 
			
		||||
#if defined(linux) || defined(CSRG_BASED)
 | 
			
		||||
    _DtPrintMarginEnum which = *((_DtPrintMarginEnum *) data);
 | 
			
		||||
#else
 | 
			
		||||
    _DtPrintMarginEnum which = (_DtPrintMarginEnum) data;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    _DtPrintMarginEnum which = (_DtPrintMarginEnum)(long)data;
 | 
			
		||||
 | 
			
		||||
    text = pui->getWidget();
 | 
			
		||||
    if (text)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue