Skip to content
Snippets Groups Projects
  • Henrik (Grubba) Grubbström's avatar
    9c6c2c68
    Strings [`+]: Fixed handling of empty string. · 9c6c2c68
    Henrik (Grubba) Grubbström authored
    Don't propagate the min range from the empty string when adding strings.
    
    Code that triggered the bug:
    
      string res = "";
      foreach(a, string segment) {
        res += segment + "/";  // Adds "" + segment + "/".
        // res here got min set to 0 (kept from "").
        // ...
      }
    
    This caused string_has_null() to return true for the above string res.
    
    Fixes [bug 7826].
    9c6c2c68
    History
    Strings [`+]: Fixed handling of empty string.
    Henrik (Grubba) Grubbström authored
    Don't propagate the min range from the empty string when adding strings.
    
    Code that triggered the bug:
    
      string res = "";
      foreach(a, string segment) {
        res += segment + "/";  // Adds "" + segment + "/".
        // res here got min set to 0 (kept from "").
        // ...
      }
    
    This caused string_has_null() to return true for the above string res.
    
    Fixes [bug 7826].