Author Topic: A very surprising bug  (Read 1464 times)

0 Members and 1 Guest are viewing this topic.

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1899
    • View Profile
A very surprising bug
« on: December 17, 2007, 01:48:17 AM »
Small tpl with stange bug
Quote
<html>
<head>
{{!rejetto}}
<script language="javascript" type="text/javascript">
function changewhere(code){
    switch (code)
     { 
     case 1 : if (true) {mycode|=1;} else {mycode^=1;}; break;
     case 2 : if (true) {mycode|=2;} else {mycode^=2;}; break;
     case 3 : if (true) {mycode|=2;} else {mycode^=2;}; break;
     case 4 : if (true) {mycode|=2;} else {mycode^=2;}; break;
    default : mycode=0; break;
     }
}   
</script>
</head>
<body>
{{!one}} {{!two}} {{!three}} {{!four}} {{!end}}
</body>
</html>
web page: on build 163
rejetto {{!one}} {{!two}} {{!three}} four end

same by deleting  one line
Quote
<html>
<head>
{{!rejetto}}
<script language="javascript" type="text/javascript">
function changewhere(code){
    switch (code)
     { 
     case 1 : if (true) {mycode|=1;} else {mycode^=1;}; break;
     case 2 : if (true) {mycode|=2;} else {mycode^=2;}; break;
     case 3 : if (true) {mycode|=2;} else {mycode^=2;}; break;
    default : mycode=0; break;
     }
}   
</script>
</head>
<body>
{{!one}} {{!two}} {{!three}} {{!four}} {{!end}}
</body>
</html>
web page: on build 163
rejetto {{!one}} {{!two}} three four end

It seems that the usage of several ¦ in this context is  the cause of bug when he is beetwen  {   }

Quote
<html>
<head>
{{!rejetto}}
<script language="javascript" type="text/javascript">
function changewhere(code){
    switch (code)
     { 
     case 1 : if (true) {mycode|=1;} else {mycode|=1;}; break;
     case 2 : if (true) {mycode|=2;} else {mycode=2;}; break;
     case 3 : if (true) {mycode=2;} else {mycode=2;}; break;
    default : mycode=0; break;
     }
}   
</script>
</head>
<body>
{{!one}} {{!two}} {{!three}} {{!four}} {{!end}}
</body>
</html>

web page: on build 160

macro error: !rejetto
{{!one}} {{!two}}
macro error: !three
macro error: !four
macro error: !end


but not
macro error: !rejetto
macro error: !one
macro error: !two 
macro error: !three
macro error: !four
macro error: !end


web page: on build 146
{{!one}} {{!two}} {{!three}} {{!four}} {{!end}}

why is the question!! ??? ???
« Last Edit: December 17, 2007, 02:05:09 AM by mars »

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12953
    • View Profile
Re: A very surprising bug
« Reply #1 on: December 17, 2007, 03:24:23 PM »
fixed in next beta

thank you for reporting