diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-25 21:02:07 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-25 21:02:07 -0400 |
commit | ac000a67c4e9c75e11e43018e5f16242b4d99226 (patch) | |
tree | c4cf1695cfe394d35c09f7e569eee5e4de00114b /ledger.el | |
parent | ab86cd8c3743ba5ae5c2ef2f7e20c51b870bb7e5 (diff) | |
download | fork-ledger-ac000a67c4e9c75e11e43018e5f16242b4d99226.tar.gz fork-ledger-ac000a67c4e9c75e11e43018e5f16242b4d99226.tar.bz2 fork-ledger-ac000a67c4e9c75e11e43018e5f16242b4d99226.zip |
fixed two memory corruption bugs
Diffstat (limited to 'ledger.el')
-rw-r--r-- | ledger.el | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -119,11 +119,14 @@ (with-temp-buffer (setq exit-code (apply 'ledger-run-ledger "entry" args)) (if (= 0 exit-code) - (if insert-year - (buffer-string) - (buffer-substring 5 (point-max))) + (progn + (goto-char (point-min)) + (delete-char 1) + (if insert-year + (buffer-string) + (buffer-substring 5 (point-max)))) (concat (if insert-year entry - (substring entry 5)) "\n\n"))))))) + (substring entry 5)) "\n"))) "\n")))) (defun ledger-expand-entry () (interactive) |