Nombas Homepage

Scripting

Products

Purchase

Download

Support

Company

Nombas > SE:ISDK DevSpace > Errata > Standard Obj/Function Library Errata

 

Standard Objects and Function Library Errata
Problems with the objects and function library will effect all of the products

  Version 4.40D errata

  • RegExp.prototype._class wrong
    (for ISDK/C 440d)

    Bug: RegExp.prototype._class, and so (new RegExp)._class, should be defined as "RegExp" but is instead defined as the number NaN.

    Fix: In srclib/ecma/seregexp.c, in the definition of RegExpFunctionTable, at about line 817, replace this line:

  •    JSE_VARSTRING( JseStr(jsecontext,prototype__class), JseStr(jsecontext,RegExp), jseDontEnum)

with this

   JSE_VARSTRING( JseStr(jsecontext,prototype__class), UNISTR("\"RegExp\""), jseDontEnum)

  Version 4.40C errata

  • global C variable in Date object conflict for multiple threads
    (for ISDK/C 440c)

    Bug: The Ecma Date library contains globals which should be initialized only once, but in multiple threads may be initialized many times, potentially leading to invalid data or crashes.

    Fix: In srclib/ecma/sedate.c, remove "static" and "VAR_DATA" from the two variable definitions at the beginning of millisec_from_gmtime(), at about line 378, so they read:

       jsebool first_time = True;
       jsenumber diff;

  • toString(radix) not returing correct value for 0
    (for ISDK/C 440c)

    Bug: The following simple script should return "0", but does is not:

       var z = (0).toString(10);

    Fix: In srclib/ecma/seobject.c, function EcmaNumberToStringWithRadix(), near the beginning of the function before the test jseIsNegative(val) (at about line 2056), add this code:

  •    if ( jseIsZero(val) )
       {
          strcpy_jsechar((jsecharptr)buf,UNISTR("0"));
          return;
       }

  • Unix version of SElib.dynamicLink not locating shared object path
    (for ISDK/C 440c)

    Bug: On unix systems, when calling SElib.dynamicLink(), that shared object may not be located via LD_ELF_LIBRARY_PATH or LD_LIBRARY_PATH.

    Fix: In srclib/common/sedynlib.c change both instances of GetEnvironment(UNISTR("blah")) to getenv("blah"). Specifically, these two calls:

  •    const jsecharptr libpath = GetEnvironment(UNISTR("LD_ELF_LIBRARY_PATH"));
       libpath = GetEnvironment(UNISTR("LD_LIBRARY_PATH"));

    become these

       const jsecharptr libpath = getenv("LD_ELF_LIBRARY_PATH");
       libpath = getenv("LD_LIBRARY_PATH");
  • buffer.getString not stopping at the null character
    (for ISDK/C 4.40c)

    Bug: Buffer.prototype.getString() is not terminating strings at the first null character, as specified in the documentation.

    Fix: This will be fixed with the 4.40d release.

 

  • array.concat adds extra null item on initial element
    (for ISDK/C 4.40c)

    Bug: If Array.prototype.concat is used on an initialy empty array, and extra element is added at the beginning. For example, this code:

  • var foo = new Array();
    foo = foo.concat("one");
    foo = foo.concat("two");
    display("foo = " + foo);

will produce this incorrect output:

foo = ,one,two

Fix: In srclib/ecma/seobject.c, function Ecma_Array_concat(), at about line 1204 change these lines:

NULL != (temp = jseMemberEx(jsecontext,param,JseStr(jsecontext,_class),
                            jseTypeUndefined,jseCreateVar|jseDontCreateMember)) &&

to these:

NULL != (temp = jseGetMemberEx(jsecontext,param,JseStr(jsecontext,_class),
                               jseCreateVar)) &&

  Version 4.30E errata (may apply to earlier versions)

  • RegExp.prototype._class wrong
    (for ISDK/C 430e)

    Bug: RegExp.prototype._class should be defined as "RegExp" but is instead defined as the number NaN.

    Fix: In srclib/ecma/seregexp.c, in the definition of RegExpFunctionTable, at about line 817, replace this line:

  •    JSE_VARSTRING( PROTOCLASS_PROPERTIES, REGEXP_PROPERTY, jseDontEnum),

with this

   JSE_VARSTRING( PROTOCLASS_PROPERTIES, UNISTR("\"RegExp\""), jseDontEnum),

  Version 4.30D errata (may apply to earlier versions)

  • global C variables conflict for multiple threads
    (for ISDK/C 4.30d)

    Bug: The Ecma libraries contain globals which should be initialized only once, but in multiple threads may be initialized many times, potentially leading to invalid data or crashes.

    Fix: These variables(first_time and diff in sedate.c; seInfinity, seNegInfinity, and SeNaN in ecmamisc.c) have been made thread-safe with the 4.30e release. If you need fixes for earlier released contact http://support.nombas.com/.

  • Unix version of SElib.dynamicLink not locating shared object path
    (for ISDK/C 4.30d)

    Bug: On unix systems, when calling SElib.dynamicLink(), that shared object may not be located via LD_ELF_LIBRARY_PATH or LD_LIBRARY_PATH.

    Fix: In srclib/common/sedynlib.c change both instances of GetEnvironment(UNISTR("blah")) to getenv("blah"). Specifically, these two calls:

  •    const jsecharptr libpath = GetEnvironment(UNISTR("LD_ELF_LIBRARY_PATH"));
       libpath = GetEnvironment(UNISTR("LD_LIBRARY_PATH"));

    become these

       const jsecharptr libpath = getenv("LD_ELF_LIBRARY_PATH");
       libpath = getenv("LD_LIBRARY_PATH");
  • buffer.getString not stopping at the null character
    (for ISDK/C 4.30d)

    Bug: Buffer.prototype.getString() is not terminating strings at the first null character, as specified in the documentation.

    Fix: This will be fixed with the 4.30e release.

 

  • Error:SEDBC: When a cursor object is asked for a field and it's at the end of the record, the field is not found, although it should be. For example:
    #link "sedbc"
       
    var db = new Database();
    var err = db.connect("ODBC", "one_record_db", "ADMIN",          "");
    var cur = db.cursor("Select approver From Invoices Where invoice_number='12345'",          db.dynaset);
    Screen.writeln(cur[0]);

    In the above example, if there is only one entry in the database, the call to Screen.writeln() will print "undefined", because cur[0] will not be found.

    Fix: Around line 122 of the file se430\srclib\sedbc\cursor_f.c, replace the following statements:

    if(jseRecordset_IsEOF(This) || jseRecordset_IsBOF(This))
       return NULL;

    with these:

    
    /* Changed from ||. This statement checks for an empty record. */
    if(jseRecordset_IsEOF(This) && jseRecordset_IsBOF(This))
       return NULL;

  • Error: The "length" property on instances of Array objects is not jseDontEnum and jseDontDelete, so it will sho up in error when enumerating instances of array objects.

    Fix: In srccore/var.c, function seobjMakeEcmaArray(), at about line 1332, add a line setting the jseDontEnum and jseDontDelete attributes. So that these lines:

    /* make sure it has a length */
    mem = seobjNewMember(call,obj,call->Global->global_strings[length_entry],&found);
    SEVAR_INIT_NUMBER(&(mem->value),jseZero);

become these:

    /* make sure it has a length */
    mem = seobjNewMember(call,obj,call->Global->global_strings[length_entry],&found);
    /* length property is DontEnum and DontDelete */
    mem->attributes = jseDontEnum | jseDontDelete;
    SEVAR_INIT_NUMBER(&(mem->value),jseZero);
  • String.prototype.replace() function auto-converts first parameter to a Regular Expression object if it's not one already, then performs replacement based on that. Instead, if the first parameter isn't a Regular Expression object it should auto-convert it to a string, then perform a simple search and replace for that string in the current "this" variable. The additional code required for the fix, as well as instructions on how to do so can be found at ftp://ftp.nombas.com/pub/isdkeval/se430/replace.txt
  • Error: string.lastIndexOf does not handle offset (the optional second parameter) correctly if it is negative. For example, in this script
  • var str = new String("Hello, World");
    var idx = str.lastIndexOf("H",-1);

the value of idx would be -1, when it should be 0.

Fix: In srclib/ecma/seobject.c, function Ecma_String_lastIndexOf, at about line 3275, change this code:

if ( start < 0 )
   start = -1;

to this:

if ( start < 0 )
   start = 0;
  • :The locale functions for an instance of the date object (toLocaleString, toLocaleDateString, and toLocaleTimeString) are doing nothing differently than the standard non-locale functions (toString, toDateString, and toTimeString). Because the ECMA standard is very non-specific about what toLocaleString() does for any function, and because the platforms and compilers we support are so varied in their locale implementations, we have so far avoided the issue.

    Fix: A new version of SEDATE.C is available via ftp (download here) which will use the JSE_TOLOCALEDATE_FUNCTION macro, if defined, to manage locales for the date function. In the comments, at the top of that file, is also a description for how one

  • Problem: The locale functions for an instance of the date object (toLocaleString, toLocaleDateString, and toLocaleTimeString) are doing nothing differently than the standard non-locale functions (toString, toDateString, and toTimeString). Because the ECMA standard is very non-specific about what toLocaleString() does for any function, and because the platforms and compilers we support are so varied in their locale implementations, we have so far avoided the issue.

Fix: A new version of SEDATE.C is available via ftp (download here) which will use the JSE_TOLOCALEDATE_FUNCTION macro, if defined, to manage locales for the date function. In the comments, at the top of that file, is also a description for how one may add a JSE_TOLOCALEDATE_FUNCTION if your C library supports the standard strftime() function.

  • Problem: Date object TimeZone calculation may be inefficient or incorrect.

    Fix: If the system makes an ftime() function available, then use it. In srclib/ecma/sedate.c, function millisec_from_gmtime(), at about line 412 replace this code:

    #     else
          {
             /* Difference between time here and GMT. This computation

    with this conditional change

    #     elif defined(__JSE_MAC__) || defined(__JSE_VXWORKS__) || defined(__DEFAULT_TIME_C_FUNCTION__)
          {
             /* Difference between time here and GMT. This computation

    and then at line 454 replace this code:

          }
    #     endif 

    with this

          }
    #     else
             /* if ftime is supported then use it directly */
             struct timeb tb;
             ftime(&tb);
             diff = JSE_FP_MUL(JSE_FP_CAST_FROM_SLONG(-tb.timezone),msPerMinute);
    #     endif

  Version 4.30C errata (may apply to earlier versions)

  • Error: Calling decodeURI, decodeURIComponent, encodeURI, or encodeURIComponent on empty strings results in an "invalid string" error.

    Fix: In srclib/ecma/ecmamisc.c, function URIDecode, line 527, replace:

jsecharptr decodedURIStr = NULL;

with

jsecharptr decodedURIStr = StrCpyMalloc(UNISTR("\0"));

and, in srclib/ecma/ecmamisc.c, function URIEncode, line 934, replace:

jsecharptr encodedURIStr = NULL;

with

    jsecharptr encodedURIStr = StrCpyMalloc(UNISTR("\0"));      
  • Error: Calling decodeURI on a string that contains an escaped character that should not be unescaped results in garbage values.

    Fix: In srclib/ecma/ecmamisc.c, function URIDecode, line 718, replace:
    {
       assert( JSECHARPTR_DIFF(currCharPtr,start)>0 );
       assert( JSECHARPTR_DIFF(currCharPtr,start)<URIDECODE_COPY_BUFFER_SIZE          );
             
       strncpy_jsechar((jsecharptr)s,start,(size_t)JSECHARPTR_DIFF(currCharPtr,start));
    }
with
    {
       jsecharptr nextCharPtr = JSECHARPTR_NEXT(currCharPtr);
             
       assert( JSECHARPTR_DIFF(nextCharPtr,start)>0 );
       assert( JSECHARPTR_DIFF(nextCharPtr,start)<URIDECODE_COPY_BUFFER_SIZE          );
             
       strncpy_jsechar((jsecharptr)s,start,(size_t)JSECHARPTR_DIFF(nextCharPtr,start));
             
       JSECHARPTR_PUTC(JSECHARPTR_OFFSET((jsecharptr)s,3),'\0');
    }       
  • Some functions for the buffer object and for the DSP (distributed scripting) library are wrongly marked as insecure. The forces unneeded calls to the security manager.

    Fix: In sebuffer.c, the jseMemberWrapperFunction calls for the dynamic _get and _put (2 of each) should be marked as jseFunc_Secure. Also, in sedsp.c, all of the functions both in the table and in jseMemberWrapperFunction calls should be made secure, as only the transport and the called functions are possibly insecure, DSP itself is secure.

  • When Function.call() fails to call the function, for any reasons (such as it isn't really a function) the engine will crash. The fix in srclib/ecma/seobject.c at line 444 is to add
    if( returnVar!=NULL )

    before:

    jseReturnVar(jsecontext,returnVar,jseRetCopyToTempVar);

   Version 4.30B errata (may apply to earlier versions)

  • String.prototype.slice() function is not auto-converting all types to numerical. To fix this, in srclib/ecma/seobject.c function Ecma_String_slice, change the two instances of JSE_VN_NUMBER to be JSE_VN_CONVERT(JSE_VN_ANY,JSE_VN_NUMBER)
  • String.prototype.substring and String.prototype.substr are both calling the same wrapper-function code. These two functions should have differing behaviors according to the ECMAScript specification. The update for this code in srclib/ecma/seobject.c may be found at ftp://ftp.nombas.com/pub/isdkeval/se430/substr.c
  • Undefined types are generating errors when assigned to the well-defined window properties in the browser framework library. Fix this in the Windowput() routine of sebrowse.c; find the following three if tests:
    if( strcmp_jsechar(prop,location_PROPERTY)==0 )
    {
       /* assigning to location means something like:
        * window.location = "http://...";
        */
       JSE_FUNC_VAR_NEED(url,jsecontext,1,JSE_VN_STRING);
       text = jseGetString(jsecontext,url,NULL);
       browserGotoURL(jsecontext,browserGetLocation(jsecontext,bw),text,False);
    }
    else if( strcmp_jsechar(prop,defaultStatus_PROPERTY)==0 )
    {
       JSE_FUNC_VAR_NEED(url,jsecontext,1,JSE_VN_STRING);
       text = jseGetString(jsecontext,url,NULL);
       browserSetDefaultStatus(jsecontext,bw,text);
    }
    else if( strcmp_jsechar(prop,status_PROPERTY)==0 )
    {
       JSE_FUNC_VAR_NEED(url,jsecontext,1,JSE_VN_STRING);
       text = jseGetString(jsecontext,url,NULL);
       browserSetStatus(jsecontext,bw,text);
    }

    Put the block of all three if-tests inside this if-test:

    if( jseGetType(jsecontext,jseFuncVar(jsecontext,1))!=jseTypeUndefined                )
    {
       <the stuff above goes here>
    }
  • Error: In browserSetUpWindowObject, ~line 1165, a freed variable is being accessed. The existing code frees 'vvv', then tries to get a member of it. The fix is to change this code:
    jseSetAttributes(jsecontext,vvv,jseReadOnly | jseDontDelete);
    jseDestroyVariable(jsecontext,tmp);
    jseDestroyVariable(jsecontext,vvv);
    jseDestroyVariable(jsecontext,tmp2);

    /* Get the images array from the document object */
    vvv = jseGetMemberEx(jsecontext,vvv,images_PROPERTY,jseCreateVar);
    /* and link the images in directly by name */

to this code

jseSetAttributes(jsecontext,vvv,jseReadOnly | jseDontDelete);
jseDestroyVariable(jsecontext,tmp);
jseDestroyVariable(jsecontext,tmp2); /* Get the images array from the document object */
tmp2 = jseGetMemberEx(jsecontext,vvv,images_PROPERTY,jseCreateVar)
jseDestroyVariable(jsecontext,vvv);
vvv = tmp2;
/* and link the images in directly by name */
  • Error: In sebrowse.c some of the types are initialized using the "_prototype" member instead of "prototype", and so instances of those types are not inheriting. To fix this in brwsrlib\sebrowse.c every instance of UNISTR("XXX._prototype.YYY") should be replaced with UNISTR("XXX._prototype.YYY"). In your editor this could be accomplished by replacing every "._prototype" with ".prototype". Note that this does NOT apply to the window section, which has '_prototype.alert', and so forth. Just the ones that are 'XXX._prototype.YYY' where "XXX" is the 5 cases is "location", "history", "document", "form", or "Element".

  Version 4.30A errata (may apply to earlier versions)

  • Variables are destroyed twice while creating element array in the browser library. Fix this in sebrowse.c:2399 function browserCreateElementArray(), the 'jseIndexMember' call should be 'jseIndexMemberEx' with 'jseCreateVar' as the last parameter.
  • SELib.dynamicLink() release modules too many times. During cleanup, SELib.dynamicLink() releases each module twice instead of once. This can cause a crash if your application requires a lock on the module. To fix this: In srclib/common/sedynlib.c function dynamiclibraryUnloadModules() are three lines calling dynamiclibraryCloseModule(); remove the third such call.
  • Characters represents by values greater than 0xFF are not accepted by some xprintf() functions. The fix is to change rclib/clib/sefmtio.c, line 254 which reads:
     
       if ( NULL == (NextVar = fmtioXGetNextVar(&(This->fmtio),jsecontext,
          JSE_VN_BYTE|JSE_VN_STRING|JSE_VN_BUFFER|
          JSE_VN_COPYCONVERT|JSE_VN_LOCKREAD)))
     
    change this to:
     
       #if JSE_UNICODE!=0 || JSE_MBCS!=0
          if ( NULL == (NextVar = fmtioXGetNextVar(&(This->fmtio),jsecontext,
             JSE_VN_INT|JSE_VN_STRING|JSE_VN_BUFFER|
             JSE_VN_COPYCONVERT|JSE_VN_LOCKREAD)))
       #else
          if ( NULL == (NextVar = fmtioXGetNextVar(&(This->fmtio),jsecontext,
            JSE_VN_BYTE|JSE_VN_STRING|JSE_VN_BUFFER|
            JSE_VN_COPYCONVERT|JSE_VN_LOCKREAD)))
       #endif
  • Variable leak in SEBROWSE.C. The fis in sebrowse.c, at about line 1837, is after this comment:
     
       /* Create and assign a blank array to these three items.
     
    the variable "v" is then created with CreateNewObject(), and then
    used for 3 AssignVarToProperty() statements, but is never destroyed.
    After the three AssignVarToProperty() statements add this line:
     
       jseDestroyVariable(jsecontext,v);
     

  Version 4.20D errata (may apply to earlier versions)

  • ECMA escape/unescape functions don't correctly handle characters above 0xFF. When using the ECMA escape function on strings containing Unicode characters with code point values greater than 0xFF, those characters are not encoded correctly. The correct encoding should be '%uABCD', where ABCD is the four-digit code point value. In addition, the ECMA unescape function will not correctly unescape four-digit code point values. The fix is to download updated versions of ECMAMISC.C's Ecma_escape and Ecma_unescape functions ftp://ftp.nombas.com/pub/isdkeval/se420/bugfix.txt.
  • The Date() function is not ignoring parameters. According to the ECMAScript specification Date(year,month,day,etc...) should be ignoring all parameters and always return a string representation of the current time. In 4.30 file SEDATE.C DateCall() will be modified to ignore all input parameters.
  • Date.prototype.setTime() is not returning any value. The fix is in SEDATE.C function Ecma_Date_setTime() add this as the last line:    jseReturnNumber(jsecontext,t);

  • Clib.f____() file routines can truncate files in MBCS builds. To fix this, replace the line (652) in function Clib.fopen() in file \srclib\clib\sestdio.c
       static jseLibFunc(Clib_fopen)
       {
          ...
          jsechar buffer[1];
          ...
       }
    with
       static jseLibFunc(Clib_fopen)
       {
          ...
          jsecharptrdatum buffer[1];
          assert( sizeof(buffer[0]) == sizeof_jsechar('\x1A') );
          ...
       }

  Version 4.20C errata (may apply to earlier versions)

  • Calling the ECMA escape function on characters in the range 0x80 to 0xFF gives the value %FF. Fix: In function Ecma_escape in ECMAMISC.C, change line 270 from:
      sprintf_jsechar((jsecharptr)buffer,UNISTR("%c%02X"), '%',c);
    to
      sprintf_jsechar((jsecharptr)buffer,UNISTR("%c%02X"), '%',(ujsechar)c);
  • The code for ToSource(), and implementations for various object methods for .toSource(), have been rewritten to use some of the new ECMAScript language features. These allow better handling of all object types and of recursive object links. If you're using ToSource or toSource you'll want the new code in 4.20d, and especially the helper functions added to SEOBJFUN.C.

  Version 4.10B errata (may apply to earlier versions)

  • Date.fromSystem() makes assumptions about system time that are not valid for all compilers. This is fixed in 4.10C.
  • getArrayLength() has many errors when changing the length of Arrays and other objects. These are all fixed in 4.10C.
  • Ecma_Date_setUTCMinutes() in SEDATE.C should be changed to:
        SetHourMinSecMilli(jsecontext,3,False);
  • There were numerous problems with Clib.bsearch() and Clib.qsort()bsearch returned 0 instead of null.  Neither of them handled strings as they were supposed to.  Both of them had some bad asserts (since the errorFlag is now reset after calling a function).  All of this has been fixed now, but there are too many fixes to list.  Suffice it to say that these two functions have been fixed.
  • Clib.strtol() and Clib.strtod() were not being passed by reference, which prevented the updating of the second parameter.  The fix is to add jseFunc_PassByReference to the function flags in SESTDLIB.C.
  • Clib.fgetc() returned 0 instead of EOF if read failed. Fix in 4.10C.
  • CreateNewObject() in SEOBJECT.C should use strcmp_jsechar() instead of direct pointer comparisons to ARRAY_PROPERTY and OBJECT_PROPERTY. This allows more flexibility fo calling this useful function.
  • parseFloat() may return negative results for positive numbers. This is fixed in 4.10C. The fix is in ECMAMISC.C function Ecma_parseFloat() to initialize the neg variable to False.
  • Math.random() is not very random--very biased toward high numbers. Fixed in 4.10C. The fix in MATHOBJ.C is to bitwise-and the five "random" initializers with 0x7FFF. For example, change r1=rand() to r1=rand()&0x7fff, and so on with r2 through r5.
  • Clib.perror() crashes with null or no input parameter. Fixed in 4.10C. Workaround is to set s=UNISTR("") instead of s=NULL in Clib_perror()
  • Buffer Object will set jseApi warnings on creation. This is fixed in 4.10C. The fix in SEBUFFER.C is to replace jsePutByte() calls with jsePutBoolean() when the created variable is create with jseTypeBoolean. Many other Buffer Object bugs and inconsistencies have also big fixed and verified for 4.10C.
  • Clib.getenv() with no parameters is only returning the name of the last environment variable. Fixed in 4.10C. The fix is to move this line out of its for(;;) statement in function Clib_getenv of SESTDLIB.C
       ulong EVarCount = 0;
  • Bug fixes in SRCLIB\LANG directory, all fixed in 4.03C:
    • define() is returning an integer instead of a boolean value. Fixed in 4.03C.
    • getArrayLength() did not pass by reference, so the optional minIndex was never updated correctly. Fixed in 4.03C.
    • setAttributes() incorrectly tried to get the first parameter instead of the second parameter, causing it to expect a number as the first parameter. Fixed in 4.03C.
    • getAttributes() did not pass by reference, so any attributes of the variable were lost when a copy was made to pass to the function. Fixed in 4.03C.

  Version 4.03C errata (may apply to earlier versions)

  • The Date object has many discrepencies with the way the similar object works in Netscape's and Microsoft's browsers. Many changes have been made to match the behavior of those browsers and these will all be updated with version 4.10. If you use this object and need changes fixes before 4.10 is released contact http://support.nombas.com/ and ask for the latest version of SEDATE.C.
  • BooleanCall wrongly tries to use the second parameter passed to it, instead of the first parameter. For example "var a = Boolean(true)" will wrongly indicate the a parameter is missing. This is fixed in 4.10. The fix for this in SEOBJECT.C, function InternalLibFunc(BooleanCall), is to adjust "jseFuncVar(jsecontext,1)" to "jseFuncVar(jsecontext,0)".
  • Function() with no parameters will crash with some compilers. This is fixed in 4.10. The workaround is in SEOBJECT.C function InternalLibFunc(FunctionConstruct) is to perform the "for(x=0;x<=num-1;x++)" block only if "num!=0".

  Version 4.03B errata (may apply to earlier versions)

  • The Buffer object has been simplified (the buffer object is a Nombas extension to ECMAScript to allow direct byte manipulation of binary data). See Buffer Object description.
  • SElib.segment() and SElib.offset() functions do not get correct pointers for string types, only for buffer types. This will be corrected with 4.03C. The simple fix in SEDOS.C function SegmentOrOffset() is to call jseGetString() instead of jseGetBuffer() if SegmentOrOffsetVar is jseTypeString
  • The Math.min() and Math.max() functions always return the first argument, and no comparison is done. This will be corrected with version 4.03C. To get around this problem, use Clib.min() instead.
  • SElib.interpret() sets the error message to 0 instead of null if there is no error. This will be fixed with 4.03C.
  • SElib.tokenizeScript() returns 0 instead of null on error. This will be fixed with 4.03C.
  • SElib.fullpath() incorrectly appends a terminating null to the string. This will be fixed with 4.03C.
  • The strcat family of functions (Clib.strcat and Clib.strncat) do not set the length of the string correctly if there are null bytes present within the string. They incorrectly use the entire length of the string, rather than the length to the first null byte. This will be fixed in 4.03C. To get around this do the following:
      Clib.strcat(foo,"goo");
      SElib.setArrayLength(foo,Clib.strlen(foo))
  • The Clib.memset() function writes past the end of the buffer without extending it if the third parameter passed is greater than the length of the buffer. This will be fixed with 4.03C
  • Browser libraries Imageget and Imageput functions will be fixed for 4.03C in the following ways:
    • Imageget now does 'the regular thing' if it doesn't recognize the field name as special just as the other get functions do.
    • This change fixes Imageput.
    • Imageget wasn't returning the 'complete' field - always was returned as if undefined.
    • Several of the put functions where accessing the value as if it was its first parameter, when it is the second parameter (a number of JSE_FUNC_VAR_NEED()s with '0' as the parameter where changed to '1'.)
  • Bug reports from the field, and a more-exhaustive test suite, has shown that the comparison operators (<,>,<=,>=,=,!=) do not exactly meet the ecamscript specification in many subtle ways. We have redone the comparison operators and will release the fix with 4.03C.
  • escape() function stops at null characters and crashes if called with a zero-length string. These problems are update with version 4.03C.
  • Calls to Clib.tmpfile() crash. Fixed in version 4.03C
  • isNan and isFinite return 1 or 0 instead of true or false. This is corrected in 4.03C.
  • Global ECMA objects (e.g. Number()) do not appear in new levels of jseInterpret() if the jseNewFunctions option is declared. This is fixed with version 4.03C.

  Version 4.03A errata (may apply to earlier versions)

  • The sprintf family of functions (Clib.sprintf,Clib.rsprintf) incorrectly appended a null byte to the string. This has been fixed with 4.03B.
  • The Number() call incorrectly expected a second parameter, when in fact there is only one parameter. For example, 'foo = Number("4");' would generate an error. This has been fixed in version 4.03B. In order to work around this in earlier versions, do the following:
      foo = new Number("4");
      foo = foo.valueOf();
  • Some of the Clib string functions (Clib.strpbrk, Clib.strrchr) returned 0 instead of null. This has been fixed in version 4.03B.
  • The macro toAnsiTime() in ECMALIB/SEDATE.C is in error. This should be defined (as it is in 4.03B) to:
      #  define toAnsiTime(t) ((time_t)((t)/msPerSecond))

  Version 4.02 errata (may apply to earlier versions)

  • The Date object had some problems with dates before 1970. These are fixed in se403.
  • strcat() appends an extra NULL character to end of string
  • The Date object did not adjust correctly for daylight-savings time in version 402. This is fixed in 403. The fix for this is to change the function DaylightSavingTA() to replace fmtim(&now) with localtime(&now).

  Version 4.01 errata (may apply to earlier versions)

  • For arrays created with new Array(), the 'put' method and the 'length' property were not correctly set to not enumerate. This has been fixed for se402.
  • For the text output when using Function.toString(), the space between the function keyword and the name of the function was missing. It has been restored for se402.
  • For the toString() method of the Number object, numbers that have ending zeroes (such as 50) came out with the zeroes missing (as '5'). This is fixed in se402.

   

Home | Scripting | Products | Purchase | Download | Support | Company

Copyright ©2001, Nombas, Inc. All Rights Reserved.
Questions? Visit
http://support.nombas.com/