mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 21:43:55 +08: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
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 New Issue
Block a user