diff options
author | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-02-11 10:42:22 +0000 |
---|---|---|
committer | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-02-11 10:42:22 +0000 |
commit | 4ab30b19e8aea8e5d180149a1a54b2addde54b3f (patch) | |
tree | 4f4183ffb2bd3417de44a57bfb9390cc874413f7 | |
parent | c25eeebeae274fd671300c88a04fc052f46a804e (diff) | |
download | vdr-plugin-muggle-4ab30b19e8aea8e5d180149a1a54b2addde54b3f.tar.gz vdr-plugin-muggle-4ab30b19e8aea8e5d180149a1a54b2addde54b3f.tar.bz2 |
filling language table: truncate values from iso table if
they are too long like qaa-qtz or Official Aramaic (700-300 BCE); Imperial Aramaic (700-300 BCE)
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@1018 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r-- | mg_db.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -990,9 +990,15 @@ void mgDb::FillTables() for( int i=0; i < len; i ++ ) { char b[600]; + char id[4]; + char lang[41]; + strncpy(id,languages[i].id,3); + id[4]=0; + strncpy(lang,languages[i].name,40); + lang[40]=0; sprintf(b,"INSERT INTO language (id,language) VALUES('%s',%s)", - languages[i].id, - mgSQLString(languages[i].name).quoted()); + id, + mgSQLString(lang).quoted()); Execute(b); } len = sizeof( musictypes ) / sizeof( musictypes_t ); |