mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 21:08:40 +00:00
handle null write
This commit is contained in:
+2
-1
@@ -173,7 +173,8 @@ lnk_write_data_list_to_file_path(String8 path, String8List data)
|
|||||||
if (lnk_open_file_write((char*)path.str, path.size, &handle, sizeof(handle))) {
|
if (lnk_open_file_write((char*)path.str, path.size, &handle, sizeof(handle))) {
|
||||||
U64 offset = 0;
|
U64 offset = 0;
|
||||||
for (String8Node *data_n = data.first; data_n != 0; data_n = data_n->next) {
|
for (String8Node *data_n = data.first; data_n != 0; data_n = data_n->next) {
|
||||||
if (!lnk_write_file(&handle, offset, data_n->string.str, data_n->string.size)) {
|
U64 write_size = lnk_write_file(&handle, offset, data_n->string.str, data_n->string.size);
|
||||||
|
if (write_size != data_n->string.size) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
offset += data_n->string.size;
|
offset += data_n->string.size;
|
||||||
|
|||||||
Reference in New Issue
Block a user