Complete.Org: Mailing Lists: Archives: freeciv-dev: September 1999:
[Freeciv-Dev] Re: Core dump with latest CVS build
Home

[Freeciv-Dev] Re: Core dump with latest CVS build

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Core dump with latest CVS build
From: Corin Anderson <corin@xxxxxxxxxx>
Date: Sun, 26 Sep 1999 23:27:37 -0700 (PWT)

> >  the CVS client didn't like my .civclientrc file from
> > th 1.8.1 client.  The latest CVS clients appear to be working now.
> 
> Hah.  Do you happen to still have a copy of the .civclientrc
> which was causing the problem?  For freeciv to dump core in 
> this situation is not very polite...  (Maybe this will motivate 
> me to change the .civclientrc parsing to use section_file stuff.)

Yes, I have a copy; I've attached it.  But I've done one better -- I've
also attached a patch that will prevent this problem in the future!  8) 
It's actually just a little bandaid, to fix this particular problem, and
not the full-fledged section_file stuff that you suggest.  But, it works.
It's a one-line change to client/options.c.

Also, the .civclientrc file I had was /not/ from a stock 1.8.1 client, but
rather from my modified client.  (So it really is all my fault.  8)  )  My
worklist changes include defining a new message type, for which the client
has a new how-to-display-this-message option, and thus another line in the
rc file. 

Corey
# settings file for freeciv client version 1.8.1
#
[client]
use_solid_color_behind_units = 0
sound_bell_at_new_turn = 0
smooth_move_units = 1
flags_are_transparent = 1
ai_popup_windows = 0
ai_manual_turn_done = 1
auto_center_on_unit = 1
wakeup_focus = 1
draw_diagonal_roads = 1
center_when_popup_city = 1
message_where_00 = 3  # Low Funds                
message_where_01 = 3  # Pollution                
message_where_02 = 3  # Global Warming           
message_where_03 = 3  # Civil Disorder           
message_where_04 = 3  # City Celebrating         
message_where_05 = 3  # City Normal              
message_where_06 = 3  # City Growth              
message_where_07 = 3  # City Needs Aqueduct      
message_where_08 = 3  # Famine in City           
message_where_09 = 3  # City Captured/Destroyed  
message_where_10 = 3  # Building Unavailable Item
message_where_11 = 3  # Wonder Started           
message_where_12 = 7  # Wonder Finished          
message_where_13 = 3  # Improvement Built        
message_where_14 = 3  # New Improvement Selected 
message_where_15 = 3  # Forced Improvement Sale  
message_where_16 = 3  # Production Upgraded      
message_where_17 = 3  # Unit Built               
message_where_18 = 3  # Unit Defender Destroyed  
message_where_19 = 3  # Unit Defender Survived   
message_where_20 = 3  # Collapse to Anarchy      
message_where_21 = 3  # Diplomat Actions - Enemy 
message_where_22 = 7  # Tech from Great Library  
message_where_23 = 3  # Player Destroyed         
message_where_24 = 1  # Improvement Bought       
message_where_25 = 1  # Improvement Sold         
message_where_26 = 1  # Unit Bought              
message_where_27 = 3  # Wonder Stopped           
message_where_28 = 3  # City Needs Aq Being Built
message_where_29 = 1  # Diplomat Actions - Own   
message_where_30 = 1  # Unit Attack Failed       
message_where_31 = 1  # Unit Attack Succeeded    
message_where_32 = 3  # Suggest Growth Throttling
message_where_33 = 3  # Spaceship Events         
message_where_34 = 3  # Worklist Events          
city_report_size = 1
city_report_hstate_verbose = 1
city_report_hstate_concise = 0
city_report_workers = 1
city_report_specialists = 1
city_report_resources = 1
city_report_output = 1
city_report_num_trade = 0
city_report_food = 1
city_report_pollution = 0
city_report_corruption = 0
city_report_building = 1
diff -u -r1.12 options.c
--- options.c   1999/09/25 12:05:35     1.12
+++ options.c   1999/09/27 05:23:12
@@ -225,7 +225,7 @@
 
     /* parse variable names */
     if ((s = strstr(buffer, "message_where_"))) {
-      if (sscanf(s+14, "%d", &ind) == 1) {
+      if (sscanf(s+14, "%d", &ind) == 1 && (0 <= ind && ind < E_LAST)) {
        messages_where[ind] = val;
        goto next_line;
       }

[Prev in Thread] Current Thread [Next in Thread]