| 697 | |
| 698 | |
| 699 | ILint ILAPIENTRY iWriteLump(const void *Buffer, ILuint Size, ILuint Number) |
| 700 | { |
| 701 | ILuint SizeBytes = Size * Number; |
| 702 | ILuint i = 0; |
| 703 | |
| 704 | for (; i < SizeBytes; i++) { |
| 705 | if (WriteLumpSize > 0) { |
| 706 | if (WriteLumpPos + i >= WriteLumpSize) { // Should we use > instead? |
| 707 | ilSetError(IL_FILE_WRITE_ERROR); |
| 708 | WriteLumpPos += i; |
| 709 | return i; |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | *((ILubyte*)WriteLump + WriteLumpPos + i) = *((ILubyte*)Buffer + i); |
| 714 | } |
| 715 | |
| 716 | WriteLumpPos += SizeBytes; |
| 717 | |
| 718 | return SizeBytes; |
| 719 | } |
| 720 | |
| 721 | |
| 722 | ILint ILAPIENTRY iSeekWFile(ILint Offset, ILuint Mode) |
nothing calls this directly
no test coverage detected