Changeset 43901 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Nov 16, 2012 5:28:53 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/packer/pack_shaders.c
r37393 r43901 53 53 for (i=0; i<count; ++i) 54 54 { 55 pLocalLength[i] = ( length && (length[i]>=0)) ? length[i] : crStrlen(string[i])+1;55 pLocalLength[i] = ((length && (length[i]>=0)) ? length[i] : crStrlen(string[i]))+1; 56 56 packet_length += pLocalLength[i]; 57 57 } … … 81 81 if (string[i]) 82 82 { 83 crMemcpy(data_ptr, string[i], pLocalLength[i]); 83 if (length && (length[i]>=0)) 84 { 85 /* include \0 in the string to make intel drivers happy */ 86 crMemcpy(data_ptr, string[i], pLocalLength[i] - 1); 87 data_ptr[pLocalLength[i] - 1] = '\0'; 88 } 89 else 90 { 91 /* the \0 s already in the string */ 92 crMemcpy(data_ptr, string[i], pLocalLength[i]); 93 } 84 94 } 85 95 else
Note:
See TracChangeset
for help on using the changeset viewer.