mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fixed a crash on inputs like ls x>| less, where x doesn't exist in current directory.
This commit is contained in:
parent
63b330439e
commit
ebfcee6e67
1 changed files with 1 additions and 1 deletions
2
io.h
2
io.h
|
@ -73,7 +73,7 @@ public:
|
||||||
/** Function to get a pointer to the buffer */
|
/** Function to get a pointer to the buffer */
|
||||||
char *out_buffer_ptr(void) {
|
char *out_buffer_ptr(void) {
|
||||||
assert(out_buffer.get() != NULL);
|
assert(out_buffer.get() != NULL);
|
||||||
return &out_buffer->at(0);
|
return (out_buffer->size() == 0) ? NULL : &out_buffer->at(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function to get the size of the buffer */
|
/** Function to get the size of the buffer */
|
||||||
|
|
Loading…
Reference in a new issue