[Freeciv-Dev] [bug #22998] Inconsistant values for max enum size

2014-11-28 Thread Zakri Kneebone
Follow-up Comment #2, bug #22998 (project freeciv):

There was no crash, I was just confused by the code. So SPECENUM_COUNT > 64 is
sound if it doesn't involve the protocol.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #22998] Inconsistant values for max enum size

2014-11-28 Thread pepeto
Follow-up Comment #1, bug #22998 (project freeciv):

_MAX_LEN_ENUM_ is used as string length for the network protocol.

_max_enum_values_ is used internally in "specenum_gen.py" to define the amount
of output into "specenum_gen.h".

I don't think there are conflicts between these values, neither with
SPECENUM_COUNT. However, if you have recently experienced crashes with
specenum, it might be due to the change I committed today?


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #22998] Inconsistant values for max enum size

2014-11-28 Thread Zakri Kneebone
URL:
  

 Summary: Inconsistant values for max enum size
 Project: Freeciv
Submitted by: i1abnrk
Submitted on: Fri 28 Nov 2014 02:57:33 PM UTC
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

There is a value in fc_types.h called MAX_ENUM_LEN which is 64, there is
another value in specenum_gen.py called max_enum_values which is 125.
It seems like potential for a specenum to cause a segmentation fault when the
SPECENUM_COUNT is larger than MAX_ENUM_LEN. Either these values should be
consistent or some internal doc why they differ.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev