Author: wmb Date: 2008-08-18 12:00:37 +0200 (Mon, 18 Aug 2008) New Revision: 883
Modified: ofw/confvar/nameval.fth Log: Fixed another problem with r838. If you did "setenv boot-device foo", then "setenv boot-file bar", then the second setenv would fail, saying "Out of environment space". The problem was that the null character that terminates each name=value pair was being omitted.
Modified: ofw/confvar/nameval.fth =================================================================== --- ofw/confvar/nameval.fth 2008-08-15 01:18:39 UTC (rev 882) +++ ofw/confvar/nameval.fth 2008-08-18 10:00:37 UTC (rev 883) @@ -115,8 +115,7 @@ tuck r@ swap move ( $value name-len ) r> + [char] = over c! 1+ ( $value nv-value-adr ) 2dup 2>r swap move 2r> ( value-len nv-value-adr ) - over + 1- ( value-len last-char-adr ) -\ over + 0 over c! ( value-len terminator-adr ) + over + 0 over c! ( value-len terminator-adr ) update-modified-adr ( value-len ) then ( value-len | -1 ) ;