This is an automated email from the ASF dual-hosted git repository.

adamfeuer pushed a commit to branch fix/12.5-sama5
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit aa4249940da2719428257ab00c287244662be540
Author: Adam Feuer <[email protected]>
AuthorDate: Sun Sep 28 22:45:20 2025 -0700

    fixed nxplayer buffer length definition
---
 system/nxplayer/nxplayer_main.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/system/nxplayer/nxplayer_main.c b/system/nxplayer/nxplayer_main.c
index dc9d60152..77ab4a923 100644
--- a/system/nxplayer/nxplayer_main.c
+++ b/system/nxplayer/nxplayer_main.c
@@ -48,6 +48,17 @@
 #  define NXPLAYER_HELP_TEXT(x)
 #endif
 
+/* Size of the command input buffer.  Prefer the NSH line length when the
+ * shell is enabled so behaviour matches other readline users, otherwise
+ * fall back to a modest default.
+ */
+
+#ifdef CONFIG_NSH_LINELEN
+#  define NXPLAYER_LINELEN CONFIG_NSH_LINELEN
+#else
+#  define NXPLAYER_LINELEN 80
+#endif
+
 /****************************************************************************
  * Private Type Declarations
  ****************************************************************************/
@@ -737,7 +748,7 @@ static int nxplayer_cmd_help(FAR struct nxplayer_s 
*pplayer, char *parg)
 
 int main(int argc, FAR char *argv[])
 {
-  char                    buffer[CONFIG_NSH_LINELEN];
+  char                    buffer[NXPLAYER_LINELEN];
   int                     len;
   int                     x;
   int                     running;

Reply via email to