MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_buffer

Method get_buffer

compat/file_access_encrypted_v3.cpp:211–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211uint64_t FileAccessEncryptedv3::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
212 ERR_FAIL_COND_V(!p_dst && p_length > 0, -1);
213 ERR_FAIL_COND_V_MSG(writing, -1, "File has not been opened in read mode.");
214
215 uint64_t to_copy = MIN(p_length, get_length() - pos);
216 for (uint64_t i = 0; i < to_copy; i++) {
217 p_dst[i] = data[pos++];
218 }
219
220 if (to_copy < p_length) {
221 eofed = true;
222 }
223
224 return to_copy;
225}
226
227Error FileAccessEncryptedv3::get_error() const {
228 return eofed ? ERR_FILE_EOF : OK;

Callers 15

resource_to_stringMethod · 0.45
decode_image_v2Method · 0.45
rename_dependenciesMethod · 0.45
read_realsFunction · 0.45
_get_stringMethod · 0.45
parse_variantMethod · 0.45
get_ustringFunction · 0.45
get_unicode_stringMethod · 0.45
openMethod · 0.45
rename_dependenciesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected