Skip to content

Commit

Permalink
Fix string index bug in table repr (#1079)
Browse files Browse the repository at this point in the history
Co-authored-by: Xiayue Charles Lin <[email protected]>
  • Loading branch information
xcharleslin and Xiayue Charles Lin authored Jun 22, 2023
1 parent 1c49647 commit 58b19e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ impl Table {
.map(|s| {
let mut str_val = s.str_value(i).unwrap();
if let Some(max_col_width) = max_col_width {
if s.len() > max_col_width {
if str_val.len() > max_col_width {
str_val = format!("{}...", &str_val[..max_col_width - 3]);
}
}
Expand Down

0 comments on commit 58b19e1

Please sign in to comment.