mirror of
https://github.com/celisej567/LibBSP.git
synced 2026-09-04 15:35:12 +03:00
Fix a small bug in parsing shader names from Source engine.
This commit is contained in:
@@ -66,9 +66,10 @@ namespace LibBSP {
|
||||
for (int i = 0; i < data.Length; ++i) {
|
||||
if (data[i] == (byte)0x00) {
|
||||
// They are null-terminated strings, of non-constant length (not padded)
|
||||
bytes = new byte[i - offset - 1];
|
||||
Array.Copy(data, offset, bytes, 0, i - offset - 1);
|
||||
bytes = new byte[i - offset];
|
||||
Array.Copy(data, offset, bytes, 0, i - offset);
|
||||
Add(new Texture(bytes, type));
|
||||
offset = i + 1;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user