URL:
  <http://gna.org/bugs/?20462>

                 Summary: Illegal requirement types considered "None" and not
an error
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Tue 29 Jan 2013 02:52:53 AM EET
                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:

Due to typo in requirement name I had a long debugging session. The typo
caused no kind of warning from ruleset loading as illegal type name is
silently translated to "None".

universal_by_rule_name():
source.kind = universals_n_by_name(kind, fc_strcasecmp);
if (!universals_n_is_valid(source.kind)) {
  source.kind = VUT_NONE;
}

Is there *any* need for requirement type "None" in the first place? One can
leave requirement vector empty if needed. And if there is, would it hurt to
require it to be always explicitly given? I think above code is meant to set
VUT_NONE in case when there's no requirement type at all.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20462>

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


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

Reply via email to