VirtualBox

Changeset 37157 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
May 19, 2011 2:53:33 PM (14 years ago)
Author:
vboxsync
Message:

crOpenGL: append 0 terminator to shader source when possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_getshaders.c

    r33045 r37157  
    208208    if (length) *length=*pLocal;
    209209    crMemcpy(source, &pLocal[1], (bufSize >= pLocal[0]) ? pLocal[0] : bufSize);
    210     crFree(pLocal);
    211 }
     210
     211    if (bufSize > pLocal[0])
     212    {
     213        source[pLocal[0]] = 0;
     214    }
     215
     216    crFree(pLocal);
     217}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette