mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[Script] Fix stupid typo in memory allocation.
This commit is contained in:
parent
40ecfcd1f1
commit
7b234ff44e
2 changed files with 2 additions and 2 deletions
|
@ -467,7 +467,7 @@ void script_mode_gather_user_scripts(void) {
|
|||
const char *file = NULL;
|
||||
while ((file = g_dir_read_name(sd)) != NULL) {
|
||||
char *sp = g_build_filename(cpath, "rofi", "scripts", file, NULL);
|
||||
user_scripts = g_realloc(user_scripts, num_scripts + 1);
|
||||
user_scripts = g_realloc(user_scripts, sizeof(ScriptUser)*(num_scripts + 1));
|
||||
user_scripts[num_scripts].path = sp;
|
||||
user_scripts[num_scripts].name = g_strdup(file);
|
||||
char *dot = strrchr(user_scripts[num_scripts].name, '.');
|
||||
|
|
|
@ -199,7 +199,7 @@ void rofi_capture_screenshot(void) {
|
|||
if (outp == NULL) {
|
||||
int index = 0;
|
||||
fpath = g_build_filename(xdg_pict_dir, filename, NULL);
|
||||
while (g_file_test(fpath, G_FILE_TEST_EXISTS) && index < 99) {
|
||||
while (g_file_test(fpath, G_FILE_TEST_EXISTS) && index < 99999) {
|
||||
g_free(fpath);
|
||||
g_free(filename);
|
||||
// Try the next index.
|
||||
|
|
Loading…
Reference in a new issue