Skip to content

Commit

Permalink
Fix A_LoopFileSizeKB/A_LoopFileSizeKB: Should be rounded down to …
Browse files Browse the repository at this point in the history
…the next whole number
  • Loading branch information
phil294 committed Jul 20, 2023
1 parent 87aceaa commit 161764b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/control-flow/loop.cr
Expand Up @@ -88,8 +88,8 @@ class Cmd::ControlFlow::Loop < Cmd::Base
thread.runner.set_global_built_in_static_var("A_LoopFileTimeAccessed", access_time.to_YYYYMMDDHH24MISS)
# thread.runner.set_global_built_in_static_var("A_LoopFileAttrib", path.basename)
thread.runner.set_global_built_in_static_var("A_LoopFileSize", file.info.size.to_s)
thread.runner.set_global_built_in_static_var("A_LoopFileSizeKB", (file.info.size / 1024).to_s)
thread.runner.set_global_built_in_static_var("A_LoopFileSizeMB", (file.info.size / 1024 / 1024).to_s)
thread.runner.set_global_built_in_static_var("A_LoopFileSizeKB", (file.info.size / 1024).to_i.to_s)
thread.runner.set_global_built_in_static_var("A_LoopFileSizeMB", (file.info.size / 1024 / 1024).to_i.to_s)
end
when LoopType::Read
line = @read_input_file.not_nil!.gets
Expand Down

0 comments on commit 161764b

Please sign in to comment.