1
0
mirror of https://github.com/8051Enthusiast/regex2fat synced 2024-12-22 06:30:28 +00:00
This commit is contained in:
micwoj92 2022-07-20 13:05:42 +02:00 committed by GitHub
parent 1e8b6bc7d0
commit f0760bb2c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ pub fn generate_fat<D: DFA>(state_blocks: &StateFatMap<D>, pad: UFat) -> Result<
fat.extend_from_slice(&FAT32_EOF);
let mut current_cluster: UFat = 2;
for state in &state_blocks.order_list {
let pl = match state_blocks.pos_hash.get(&state) {
let pl = match state_blocks.pos_hash.get(state) {
Some(x) => x,
None => return Err("Refernce to invalid state")
};

View File

@ -83,7 +83,7 @@ fn regex_to_fat32<D: DFA, W: Write>(
mut vol: W,
nomatch: bool,
) -> Result<(), Box<dyn Error>> {
let state_blocks = determine_state_positions(&dfa, &validlist, nomatch)?;
let state_blocks = determine_state_positions(&dfa, validlist, nomatch)?;
// pad until at least 65536 blocks, since otherwise ideologically
// I would have to implement fat12/fat16
// also keep at least one free block for match file (which is 0 bytes,