Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xxd -i output syntactically incorrect for empty files. #116

Closed
GoogleCodeExporter opened this issue Aug 18, 2015 · 2 comments
Closed

xxd -i output syntactically incorrect for empty files. #116

GoogleCodeExporter opened this issue Aug 18, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create an empty file:
  $ touch empty.txt
2. Run xxd -i on an empty file:
  $ xxd -i empty.txt


What is the expected output? What do you see instead?

This should return:
unsigned char empty_txt[] = {};
unsigned int empty_txt_len = 0;

However, it returns:
unsigned char empty_txt[] = {
unsigned int empty_txt_len = 0;


What version of the product are you using? On what operating system?
Vim 7.3.831 on Linux

Please provide any additional information below.
This is an issue because of the use of xxd -i in automated builds.

Original issue reported on code.google.com by lorrywoo...@gmail.com on 26 Feb 2013 at 10:43

@GoogleCodeExporter
Copy link
Author

I have fixed this with the following commit:
http://code.google.com/r/lorrywoodman-fix-xxd-zero-byte-input-bug/source/detail?
r=687a7d45da13e62bad6f801fd0873f0d86c2c8a3

Original comment by lorrywoo...@gmail.com on 26 Feb 2013 at 11:06

@GoogleCodeExporter
Copy link
Author

Should be fixed by Vim 7.3.835

Original comment by chrisbr...@googlemail.com on 30 Sep 2014 at 7:20

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant