Changeset 6436


Ignore:
Timestamp:
Jul 22, 2016, 9:20:50 AM (8 years ago)
Author:
ldelgass
Message:

Don't use user-supplied style name as array name in parseStylesheet. Fixes
error if user's style name conflicts with an internal variable name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/map.tcl

    r6413 r6436  
    12781278        #puts stderr "block: \"$block\""
    12791279        set lines [split $block ";"]
     1280        array unset styleArray
    12801281        foreach line $lines {
    12811282            set line [string trim $line]
     
    12851286            set prop [string trim [string range $line 0 [expr {$delim-1}]]]
    12861287            set val [string trim [string range $line [expr {$delim+1}] end]]
    1287             set ${styleName}($prop) $val
    1288         }
    1289         lappend styles $styleName [array get $styleName]
     1288            set styleArray($prop) $val
     1289        }
     1290        lappend styles $styleName [array get styleArray]
    12901291    }
    12911292    return $styles
Note: See TracChangeset for help on using the changeset viewer.