| ... | @@ -284,7 +284,7 @@ pub fn writeAdhocSignature( | ... | @@ -284,7 +284,7 @@ pub fn writeAdhocSignature( |
| 284 | | 284 | |
| 285 | try self.code_directory.code_slots.ensureTotalCapacityPrecise(gpa, total_pages); | 285 | try self.code_directory.code_slots.ensureTotalCapacityPrecise(gpa, total_pages); |
| 286 | self.code_directory.code_slots.items.len = total_pages; | 286 | self.code_directory.code_slots.items.len = total_pages; |
| 287 | self.code_directory.inner.nCodeSlots += total_pages; | 287 | self.code_directory.inner.nCodeSlots = total_pages; |
| 288 | | 288 | |
| 289 | // Calculate hash for each page (in file) and write it to the buffer | 289 | // Calculate hash for each page (in file) and write it to the buffer |
| 290 | var wg: WaitGroup = .{}; | 290 | var wg: WaitGroup = .{}; |
| ... | @@ -308,7 +308,7 @@ pub fn writeAdhocSignature( | ... | @@ -308,7 +308,7 @@ pub fn writeAdhocSignature( |
| 308 | const out_hash = &self.code_directory.code_slots.items[i]; | 308 | const out_hash = &self.code_directory.code_slots.items[i]; |
| 309 | wg.start(); | 309 | wg.start(); |
| 310 | try comp.thread_pool.spawn(workerSha256Hash, .{ | 310 | try comp.thread_pool.spawn(workerSha256Hash, .{ |
| 311 | opts.file, fstart, buffer[0..fsize], out_hash, &results[i], &wg, | 311 | opts.file, fstart, buffer[fstart..][0..fsize], out_hash, &results[i], &wg, |
| 312 | }); | 312 | }); |
| 313 | } | 313 | } |
| 314 | } | 314 | } |