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
         Discussion Lock: Any
        Operating System: None
         Planned Release: 



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".

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:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to